Xiangdong Huang created IOTDB-1273:
--------------------------------------

             Summary: Supports Pandas  (Python)
                 Key: IOTDB-1273
                 URL: https://issues.apache.org/jira/browse/IOTDB-1273
             Project: Apache IoTDB
          Issue Type: New Feature
          Components: Client/Python
            Reporter: Xiangdong Huang


To easily transform a query result to a [Pandas 
Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)
the SessionDataSet has a method `.todf()` which consumes the dataset and 
transforms it to a pandas dataframe.

Example:

```python
from iotdb.Session import Session
ip = "127.0.0.1"
port_ = "6667"
username_ = 'root'
password_ = 'root'
session = Session(ip, port_, username_, password_)
session.open(False)
result = session.execute_query_statement("SELECT * FROM root.*")
# Transform to Pandas Dataset
df = result.todf()
session.close()
# Now you can work with the dataframe
df = ...
```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to