Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export: Use InfluxDBClient instead of DataFrameClient
- Loading branch information
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pandas as pd | ||
|
||
|
||
def chunker(seq: pd.DataFrame, chunksize: int): | ||
""" | ||
Chunks generator function for iterating pandas Dataframes and Series. | ||
https://stackoverflow.com/a/61798585 | ||
:return: | ||
""" | ||
for pos in range(0, len(seq), chunksize): | ||
yield seq.iloc[pos:pos + chunksize] |