Skip to content

Unable to write Pandas Dataframe #169

Closed
@stepanurban

Description

@stepanurban

Hi there,
I'm not able to write pandas dataframe into Influx 2.0

import pandas as pd
import numpy as np
from datetime import datetime, timedelta

date_today = datetime.now()
days = pd.date_range(date_today, date_today + timedelta(7), freq='D')

np.random.seed(seed=1111)
data = np.random.randint(1, high=100, size=len(days))
df = pd.DataFrame({'date': days, 'col2': data})
df = df.set_index('date')
print(df)
_write_client.write("bucket", org, record=df, data_frame_measurement_name='meas')

There is only empty measurement meas. There is no output of the command even when Debug=True. What's wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions