Pandas with time-series data analysis in mind.
Project description
PDXtra is a data analysis library built on top of Pandas and geared toward time-series data analysis. The library offers subclasses of traditional Pandas Series and DataFrame objects which provide additional convenience methods for querying and manipulating data while retaining all of the functionality of the original Pandas API. Additionally, the library also provides TimeSeries and TimeSeriesDataFrame subclasses which are specifically designed to be used for time-series and financial data analysis.
What can the package do?
Downcast entire dataframes. Choose whether to downcast integer columns, float columns, or both.
Perform Excel-style x-lookup, and v-lookup.
Qickly scan dataframes for column values based on index values, and optionally search using nearest-match.
Compute the intersections of curves.
Use inter-quartile range to eliminate outliers in data sets.
Compute the linear regression of a series.
Get true N-day moving averages.
Temporarily set a dataframe index using a context manager.
Compute common financial time-series metrics including: relative strength index, moving average convergence-divergence, and on-balance volume.
Installation
python -m pip install pdxtra
Documentation
Up-to-date documentation can be found here: https://jammin93.github.io/pdxtra/
Usage
TimeSeries and TimeSeriesDataFrame are both subclasses of the Series and DataFrame objects, respectively, and they themselves are subclasses of the original Pandas DataFrame and Series objects. This means that all of the functionality of the Pandas API is inhereted by these subclasses.
Series Objects
Creation of Series and DataFrame objects follows the same syntax as traditional Pandas.
import pdxtra as pdx
series = pdx.Series([1, 2, 3, 4, 5])
time_series = pdx.TimeSeries([1, 2, 3, 4, 5])
DataFrame Objects
Creating TimeSeries and TimeSeriesDataFrame objects is no different from creating their vanilla counterparts.
import pdxtra as pdx
df = pdx.Dataframe({
"a": ["a", "b", "c", "d", "e"],
"b": [1, 2, 3, 4, 5],
})
ts_df = pdx.TimeSeriesDataFrame({
"a": ["a", "b", "c", "d", "e"],
"b": [1, 2, 3, 4, 5],
})
License
GNU General Public License
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdxtra-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pdxtra-1.0.2-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de5de2184002766870f9bc45d47c9d0f85d5278d73b3788a706cdc15713d5690
|
|
| MD5 |
b7ca527d98935c02d42d975c5169dc7e
|
|
| BLAKE2b-256 |
88cd1ae61fa129a5a597b6e70f6a7ec3ff91c24af093b0eae3543e6060729663
|