Package: pytimetk
pytimetkTime series easier, faster, more fun. Pytimetk.Please ⭐ us on GitHub (it takes 2-seconds and means a lot).Introducing pytimetk: Simplifying Time Series Analysis for EveryoneTime series analysis is fundamental in many fields, from business forecasting to scientific research. While the Python ecosystem offers tools likepandas, they sometimes can be verbose and not optimized for all operations, especially for complex time-based aggregations and visualizations.Enterpytimetk. Crafted with a blend of ease-of-use and computational efficiency,pytimetksignificantly simplifies the process of time series manipulation and visualization. By leveraging thepolarsbackend, you can experience speed improvements ranging from 3X to a whopping 3500X. Let's dive into a comparative analysis.Features/Propertiespytimetkpandas (+matplotlib)Speed🚀 3X to 3500X Faster🐢 StandardCode Simplicity🎉 Concise, readable syntax📜 Often verboseplot_timeseries()🎨 2 lines, no customization🎨 16 lines, customization neededsummarize_by_time()🕐 2 lines, 13.4X faster🕐 6 lines, 2 for-loopspad_by_time()⛳ 2 lines, fills gaps in timeseries❌ No equivalentanomalize()📈 2 lines, detects and corrects anomalies❌ No equivalentaugment_timeseries_signature()📅 1 line, all calendar features🕐 29 lines ofdtextractorsaugment_rolling()🏎️ 10X to 3500X faster🐢 Slow Rolling OperationsAs evident from the table,pytimetkis not just about speed; it also simplifies your codebase. For example,summarize_by_time(), converts a 6-line, double for-loop routine inpandasinto a concise 2-line operation. And with thepolarsengine, get results 13.4X faster thanpandas!Similarly,plot_timeseries()dramatically streamlines the plotting process, encapsulating what would typically require 16 lines ofmatplotlibcode into a mere 2-line command inpytimetk, without sacrificing customization or quality. And withplotlyandplotnineengines, you can create interactive plots and beautiful static visualizations with just a few lines of code.For calendar features,pytimetkoffersaugment_timeseries_signature()which cuts down on over 30 lines ofpandasdt extractions. For rolling features,pytimetkoffersaugment_rolling(), which is 10X to 3500X faster thanpandas. It also offerspad_by_time()to fill gaps in your time series data, andanomalize()to detect and correct anomalies in your time series data.Join the revolution in time series analysis. Reduce your code complexity, increase your productivity, and harness the speed thatpytimetkbrings to your workflows.Explore more at ourpytimetk homepage.InstallationInstall the latest stable version ofpytimetkusingpip:pipinstallpytimetkAlternatively you can install the development version:pipinstallgit+https://github.com/business-science/pytimetk.gitQuickstart:This is a simple code to test the functionsummarize_by_time:importpytimetkastkimportpandasaspddf=tk.datasets.load_dataset('bike_sales_sample')df['order_date']=pd.to_datetime(df['order_date'])df\.groupby("category_2")\.summarize_by_time(date_column='order_date',value_column='total_price',freq="MS",agg_func=['mean','sum'])DocumentationGet started with thepytimetk documentation📈 Overview🏁 Getting Started🗺️ Beginner Guides📘Applied Data Science Tutorials with PyTimeTK📄 API ReferenceDevelopers (Contributors): InstallationTo installpytimetkusingPoetry, follow these steps:1. PrerequisitesMake sure you have Python 3.9 or later installed on your system.2. Install PoetryTo install Poetry, you can use theofficial installerprovided by Poetry. Do not use pip.3. Clone the RepositoryClone thepytimetkrepository from GitHub:gitclonehttps://github.com/business-science/pytimetk4. Install DependenciesUse Poetry to install the package and its dependencies:poetryinstallor you can create a virtualenv with poetry and install the dependenciespoetryshell
poetryinstall🏆 More Coming Soon...We are in the early stages of development. But it's obvious the potential forpytimetknow in Python. 🐍Please⭐ us on GitHub(it takes 2-seconds and means a lot).To make requests, please see ourProject Roadmap GH Issue #2. You can make requests there.Want to contribute?See our contributing guide here.