Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-1273

Supports Pandas (Python)

    XMLWordPrintableJSON

Details

    Description

      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.*")

      1. Transform to Pandas Dataset
        df = result.todf()
        session.close()
      2. Now you can work with the dataframe
        df = ...
        ```

      Attachments

        Activity

          People

            jfeinauer Julian Feinauer
            hxd Xiangdong Huang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: