This Library accept pandas dataframe, date_column and optional end date If end date is not provide, current today will be use internally by the library
Project description
This package "week by Week"
is attempt to have Python library that
- Generate week range from pandas dataframe from the first data point date to the current or a given date
- Group pandas row into weekly base on the date/timestamp column
Release Log
- week-by-week version 3.14.0a0 (Released, June 21, 2022) Weekfly Dataframe capability added
- week-by-week version 3.14.0 (Released, June 20, 2022)
Usage after installation
from week_by_week import WeekRange
Instantiate the class
get_weeks = WeekRange(df, 'timestamp','2022/06/01', WK_start='sun')
Required parameter are: 1. df -- pandas dataframe 2. timestamp -- date columnin your df 3. WK_start change between 'Mon' to 'Sun' Optional parameter: 1. end_date
call getAllweeks()`` method to retrieve all weeks
weeks = get_weeks.getAllweeks()```
And to retrieve data splitted into week range,
invoke getWeekData()
print(get_weeks.getWeekData())
To retrieved Pandas Dataframe splited into week invoke the following interface method
for week in get_weeks.retunpandasDF():
print(week)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for week_by_week-3.14.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc7c70dac604cbe5f619977f928a632786d572d5e7c412d837d4f0de6d2e858 |
|
MD5 | a52d465797079662759cdbf2825dad6a |
|
BLAKE2b-256 | fd8f49c93c2d92d22fa8eb9e97a2b8b2050487b5bee07bbc6fd656713043ddbf |