man-group / arctic

High performance datastore for time series and tick data
https://arctic.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
3.06k stars 583 forks source link

to_records() got an unexpected keyword argument 'convert_datetime64' #843

Closed bastulli closed 4 years ago

bastulli commented 4 years ago

Arctic Version

# Arctic version 1.79.3

Arctic Store

# TickStore

Platform and version

Windows 10 Python 3.7.4 pymongo >= 3.6 Pandas 1.0.1 MongoDB >= 2.4.x

Description of problem and/or code sample that reproduces the issue

I'm having issues trying to write to the tickstore library with my date possibly causing an issue. I'm getting convert_datetime64 when trying to write. What should my date or format be?

from arctic import Arctic
from arctic.date import DateRange
from datetime import datetime
import numpy as np
import time
import pytz 

store = Arctic('localhost')
store.initialize_library('ticktest', lib_type='TickStoreV3') 
library = store['ticktest']

count = 0
while True:
    count += 1
    x = np.random.normal(size=1)
    y = np.random.normal(size=1)
    data_dumb = {'price':x[-1],'volume':y[-1]}

    u = datetime.utcnow()
    u = u.replace(tzinfo=pytz.utc)

    df = pd.DataFrame(data_dumb,index=[u])     

    library._chunk_size = 1
    library.write('test', df)
    print(df)
    time.sleep(0.5)
    if count > 10:
         break

to_records() got an unexpected keyword argument 'convert_datetime64'

bastulli commented 4 years ago

Found this in another issue listed here. It may be that the new version of pandas stopped supporting a required feature.

convert_datetime64 has actually been deprecated now, so this actually keeps TickStore from working for users of current versions of pandas.

bnouvelbmll commented 4 years ago

We observe the same issue.

bmoscon commented 4 years ago

fixed

ehiggs commented 4 years ago

Is there a plan to release? The Pandas version isn't set in setup.py so any naive venv setups will not be able to call library.write on a TickStore.

DennyZen commented 4 years ago

i have same issue. need to downgrade pandas for using library.write ? which version ? maybe need add hint to doc ?

ehiggs commented 4 years ago

This works for me:

pandas==0.25.3