Closed trbck closed 6 years ago
Try using df.tail()
instead of df.tail(1)
which only displays the last record.
I know, just wanted to simply highlight that it does not seem to append the last row :)
Also the length of the df stays the same. Might this somehow be related to snappy?
I can't reproduce this on any of my machines...
Try:
store = pystore.store('mydatastore')
collection = store.collection('eod')
# write
collection.write('symbol', df[:-1], overwrite=True)
# append
collection.append('symbol', df[-1:] )
# read
collection.item('symbol').to_pandas() .tail()
Got it. The time offset in the dt index was the reason the append did not work an my end. It works when I strip it from the dt value ("2018-07-13 20:03:00" not "2018-07-13 20:03:00+00:00"). Thanks again!
Using latest version 0.0.12 the append function does not seem to work nor raises an error
Initial dataframe's last row:
df.tail(2)
Saving and appending:
yields:
At least on my end. What am I doing wrong here?