问题描述
我正在尝试更新Trello卡中的自定义字段,但响应中得到import pandas as pd
df = pd.read_csv("myFileSwapping.csv",encoding='latin-1',keep_default_na=False,na_values=[""])
def df_column_switch(df,column1,column2):
i = list(df.columns)
a,b = i.index(column1),i.index(column2)
i[b],i[a] = i[a],i[b]
df = df[i]
df.insert(loc=4,column='Sep',value=['' for i in range(df.shape[0])])
df.to_csv('outFile.csv',header=True,index=False,encoding='latin-1')
return df
print(df_column_switch(df,'col3','col4'))
。
到目前为止,我已经尝试过:
404
在try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
MyUtils myUtils = new MyUtils();
HttpPost post = new HttpPost("https://api.trello.com/1/cards/" + CARD_ID + "/customField/" + CUSTOMFIELD_ID + "/item");
List<NameValuePair> urlParameters = new ArrayList<>();
urlParameters.add(new BasicNameValuePair("key",TRELLO_KEY));
urlParameters.add(new BasicNameValuePair("token",TRELLO_TOKEN));
urlParameters.add(new BasicNameValuePair("value","{'text': 'this is a new string'}"));
post.setEntity(new UrlEncodedFormEntity(urlParameters,"UTF-8"));
try (CloseableHttpResponse response = httpClient.execute(post)) {
int responseCode = response.getStatusLine().getStatusCode();
System.out.println("response from customField = " + responseCode);
}
} catch (UnsupportedEncodingException e) {
e.printstacktrace();
} catch (IOException | ParseException e) {
e.printstacktrace();
}
中,我也尝试过
urlParameters
和
urlParameters.add(new BasicNameValuePair("text","hello"));
我想念什么? 非常感谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)