Created
January 22, 2020 06:54
-
-
Save nim4n136/872b5c872cec64a1eda58c3bacc7d07d to your computer and use it in GitHub Desktop.
Final chunked pandas
This file contains hidden or 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
| import urllib.request | |
| from urllib.request import urlopen | |
| import pandas as pd | |
| from datetime import date | |
| start = str('2019-01-01') | |
| end = str('2020-01-22') | |
| dates = pd.date_range(start, end, freq="D") | |
| # 30 item per cluster | |
| n = 30 | |
| final = [dates[i * n:(i + 1) * n] for i in range((len(dates) + n - 1) // n )] | |
| print(final) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment