Skip to main content

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

  1. Generate week range from pandas dataframe from the first data point date to the current or a given date
  2. Group pandas row into weekly base on the date/timestamp column

Release Log

  1. week-by-week version 3.14.0a0 (Released, June 21, 2022) Weekfly Dataframe capability added
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

week_by_week-3.14.0b0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

week_by_week-3.14.0b0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file week_by_week-3.14.0b0.tar.gz.

File metadata

  • Download URL: week_by_week-3.14.0b0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-44-generic

File hashes

Hashes for week_by_week-3.14.0b0.tar.gz
Algorithm Hash digest
SHA256 05346fa64601ff121229832176c3735314f59e9abb5fcb3a8c18f8c2f3e42667
MD5 bf69805538321787dd2483290a631c38
BLAKE2b-256 1bf0510722ec1979fbd3f5879d09232fb3a5f4b4d47b2184553b31934349842c

See more details on using hashes here.

File details

Details for the file week_by_week-3.14.0b0-py3-none-any.whl.

File metadata

  • Download URL: week_by_week-3.14.0b0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-44-generic

File hashes

Hashes for week_by_week-3.14.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 bdc7c70dac604cbe5f619977f928a632786d572d5e7c412d837d4f0de6d2e858
MD5 a52d465797079662759cdbf2825dad6a
BLAKE2b-256 fd8f49c93c2d92d22fa8eb9e97a2b8b2050487b5bee07bbc6fd656713043ddbf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page