그냥 Append 한다고끝이아니라
이렇게 직접 넣어줘야한다
self.sell_list = self.sell_list.append(pd.DataFrame([['22','151','sadsad']],columns=['date','sell_price','reason']))
예제
print("before sell_list %s" %self.sell_list)
self.sell_list = self.sell_list.append(pd.DataFrame([['22','151','sadsad']],columns=['date','sell_price','reason']))
print("after sell_list %s" % self.sell_list)
# self.sell_list = pd.DataFrame(['22','151','sadsad'],index=['date','sell_price','reason'])
# self.sell_list.append(pd.Series)
# self.sell_list.append(pd.DataFrame(['22','151','sadsad'],index=['date','sell_price','reason']))
print("0번째 인덱스 값 %s "%self.sell_list.iloc[0])
댓글 없음:
댓글 쓰기