8000 Make the pandas client easy to use, and fix the precision invalids by SatoshiNewton · Pull Request #555 · influxdata/influxdb-python · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Make the pandas client easy to use, and fix the precision invalids #555

Closed
wants to merge 3 commits into from

Conversation

SatoshiNewton
Copy link

Here, I just make the pandas dataframe client convert the key to string automatically.
Further more, I found the example have a problem about time_precision.
The time_precision of dataframe client required the lower word, but pandas automatically make the freq in upper word.
I am not pretty sure did that's relative with the update of pandas, but I fixed it with consider about upper word and lower word at the same time.

Originally, the setting is use the list to confirm the precision issue,  ['n', 'u', 'ms', 's', 'm', 'h', 'N', None].
However, i change the list to another form, ['n', 'u'
8000
, 'ms', 's', 'm', 'h', 'N', 'U', 'L', 'S', 'M', 'H', None], because the pandas have some different in mine work.
Pandas version: 0.22.0
OS: OS X.
@sebito91 sebito91 self-assigned this Apr 8, 2020
Copy link
Contributor
@sebito91 sebito91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your commit @SatoshiNewton, though I have to be honest I'm not sure exactly what we're solving for here.

Can you please give an example of where/when you're seeing issues that would make these changes necessary?

@@ -492,7 +492,7 @@ def _write_points(self,
retention_policy,
tags,
protocol='json'):
if time_precision not in ['n', 'u', 'ms', 's', 'm', 'h', None]:
if time_precision not in ['n', 'u', 'ms', 's', 'm', 'h', 'N', 'U', 'L', 'S', 'M', 'H', None]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what these extra time precision components are meant to be?

@sebito91
Copy link
Contributor

Closing for now, please let me know if this is an important fix and we can re-open!

@sebito91 sebito91 closed this Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development
39BD

Successfully merging this pull request may close these issues.

3 participants
0