我試圖顯示一個數據框作爲具有xlim的自定義日期範圍的條形圖。我能夠輸出的曲線圖,如果我選擇kind='line'但我得到以下錯誤消息試圖kind='bar'時: TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any suppo
我有一個熊貓數據框中的列從0到172800000以10步爲單位。我想從那天的午夜開始將指定日期轉換爲日期時間戳。 因此,假設, time = np.arange(0,172800000, 10)
我想這個轉換的格式如下: YYYY-MM-DD: HH:MM:SS.XXX
的起始日期應該是2016年9月20日。 這裏是我做了什麼: # Create a dummy frame as an e
添加新列有這樣 A B
0 a 1
1 b 2
2 c 3
3 d nan
4 e nan
一個數據幀我想補充的C柱像下面 A B C
0 a 1 a1
1 b 2 b2
2 c 3 c3
3 d nan d
4 e nan e
所以,我想 df["C"]=df.A+df.B
但它返回 C
a1
b2
c3
nan
nan
怎樣才能得到正確的結果?