timeplus-io / proton-python-driver

Python driver for Timeplus Enterprise or Timeplus Proton
https://pypi.org/project/proton-driver/
Other
14 stars 4 forks source link

'Cursor' object has no attribute 'df' #63

Closed gangtao closed 1 day ago

gangtao commented 1 day ago

here is my code

from proton_driver import connect
import pandas as pd
with connect(f'proton://{timeplus_user}:{timeplus_password}@{timeplus_host}') as conn:
        with conn.cursor() as cur:
            cur.execute('SELECT * from table(network_traffic)')
            print(cur.df()) # Pandas DataFrame

when running such code, I got


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[16], line 6
      4 with conn.cursor() as cur:
      5     cur.execute('SELECT * from table(network_traffic)')
----> 6     print(cur.df()) # Pandas DataFrame

AttributeError: 'Cursor' object has no attribute 'df'

the proton driver version is

Successfully installed proton_driver-0.2.11 tzlocal-5.2

other method seems also not exists fetchnumpy() pl() arrow()

yuzifeng1984 commented 1 day ago

released 0.2.12 for these methods