Skip to main content

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


Download files

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

Source Distribution

pdxtra-1.0.0.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

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

pdxtra-1.0.0-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file pdxtra-1.0.0.tar.gz.

File metadata

  • Download URL: pdxtra-1.0.0.tar.gz
  • Upload date:
  • Size: 46.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for pdxtra-1.0.0.tar.gz
Algorithm Hash digest
SHA256 54e3537d59434fc7cf9db2ec484c67e441495f4490e3ad8d2ded0fe2a7fc01f5
MD5 1e9860dfadd966b50540b7709dd142dc
BLAKE2b-256 ab84820079edd497d17f03289ddda5ca5ee82806928a7bcace540f7b3819a34f

See more details on using hashes here.

File details

Details for the file pdxtra-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pdxtra-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for pdxtra-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5a8676b64e3b5aa5a4785c4b3cf35248a9508e820dca3929ed9f5b5e6526f20
MD5 e6b40bbe61fcb967b46b5746dc9b7f15
BLAKE2b-256 e019187f4c04a3ae1e877fdf461b18388d059b65c095d31a8eaabb068b67d7b4

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