Reformatting the CSV Data

Hello all,
Im using influxdbv2 and exporting data seems to be a challenge with the CSV.

Number 1:
Right now the data is being downloaded to csv in UTC. Is there a way for me to download in a different time zone? E.g UTC to SGT

Number 2:
The CSV file is written like this:

table _start _stop _time _value _field _measurement
0 2022-06-03T01:11:25.7168602Z 2022-06-03T01:12:25.7168602Z 2022-06-03T01:11:30Z 49.33333333 humidity Sensor 4
1 2022-06-03T01:11:25.7168602Z 2022-06-03T01:12:25.7168602Z 2022-06-03T01:11:30Z 26.81333333 temperature Sensor 4

Is there a way to change it to:

_start _stop _time humidity temperature _measurement
2022-06-03T01:11:25.7168602Z 2022-06-03T01:12:25.7168602Z 2022-06-03T01:11:30Z 49.33333333 26.81333333 Sensor 4

Or something similar for ease of use?

1 Like

Hello @subwayfootlong,

I’m confused are you writing an annotated csv or a regular csv?
How are you getting the annotated csv?
And how are you trying to write the csv?

If you’re using flux to write the annotated csv you can use:

As an aside
You can use the python client library to write a dataframe to InflxuDB and change the timezone:

Here’s how you can convert csv to a dataframe
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html

Hello,

Was there any updates on exporting data to the format requested by the author of this question?