tstoolbox


Nametstoolbox JSON
Version 108.1.1 PyPI version JSON
download
home_pageNone
SummaryCommand line script and Python library to manipulate time series.
upload_time2024-04-01 01:41:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseBSD-3-Clause
keywords time-series cli-app aggregate fill filter
VCS
bugtrack_url
requirements tabulate dateparser XlsxWriter scipy numpy plottoolbox cltoolbox statsmodels pandas pytest typing_extensions matplotlib pyaf Pint_Pandas scikit_learn typical
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://github.com/timcera/tstoolbox/actions/workflows/python-package.yml/badge.svg
    :alt: Tests
    :target: https://github.com/timcera/tstoolbox/actions/workflows/python-package.yml
    :height: 20

.. image:: https://img.shields.io/coveralls/github/timcera/tstoolbox
    :alt: Test Coverage
    :target: https://coveralls.io/r/timcera/tstoolbox?branch=master
    :height: 20

.. image:: https://img.shields.io/pypi/v/tstoolbox.svg
    :alt: Latest release
    :target: https://pypi.python.org/pypi/tstoolbox/
    :height: 20

.. image:: http://img.shields.io/pypi/l/tstoolbox.svg
    :alt: BSD-3 clause license
    :target: https://pypi.python.org/pypi/tstoolbox/
    :height: 20

.. image:: http://img.shields.io/pypi/dd/tstoolbox.svg
    :alt: tstoolbox downloads
    :target: https://pypi.python.org/pypi/tstoolbox/
    :height: 20

.. image:: https://img.shields.io/pypi/pyversions/tstoolbox
    :alt: PyPI - Python Version
    :target: https://pypi.org/project/tstoolbox/
    :height: 20

tstoolbox - Quick Guide
=======================
The tstoolbox is a Python script to manipulate time-series on the command line
or by function calls within Python.  Uses pandas (http://pandas.pydata.org/)
or numpy (http://numpy.scipy.org) for any heavy lifting.

Installation
------------
Should be as easy as running ``pip install tstoolbox`` or
``easy_install tstoolbox`` at any command line.  Not sure on Windows whether
this will bring in pandas, but as mentioned above, if you start with scientific
Python distribution then you shouldn't have a problem.

Usage - Command Line
--------------------
Just run 'tstoolbox --help' to get a list of subcommands::


    usage: tstoolbox [-h]
                     {accumulate, add_trend, aggregate, calculate_fdc,
                     calculate_kde, clip, convert, convert_index,
                     convert_index_to_julian, converttz, lag, correlation,
                     createts, date_offset, date_slice, describe, dtw,
                     equation, ewm_window, expanding_window, fill, filter, fit,
                     forecast, read, gof, normalization, pca, pct_change,
                     peak_detection, pick, plot, rank, regression,
                     remove_trend, replace, rolling_window, stack, stdtozrxp,
                     tstopickle, unstack, about} ...

    positional arguments:
      {accumulate, add_trend, aggregate, calculate_fdc, calculate_kde, clip,
      convert, convert_index, convert_index_to_julian, converttz, lag,
      correlation, createts, date_offset, date_slice, describe, dtw, equation,
      ewm_window, expanding_window, fill, filter, fit, forecast, read, gof,
      normalization, pca, pct_change, peak_detection, pick, plot, rank,
      regression, remove_trend, replace, rolling_window, stack, stdtozrxp,
      tstopickle, unstack, about}

    accumulate
        Calculate accumulating statistics.
    add_trend
        Add a trend.
    aggregate
        Take a time series and aggregate to specified frequency.
    calculate_fdc
        Return the frequency distribution curve.
    calculate_kde
        Return the kernel density estimation (KDE) curve.
    clip
        Return a time-series with values limited to [a_min, a_max].
    convert
        Convert values of a time series by applying a factor and offset.
    convert_index
        Convert datetime to/from Julian dates from different epochs.
    convert_index_to_julian
        DEPRECATED: Use convert_index instead.
    converttz
        Convert the time zone of the index.
    lag
        Create a series of lagged time-series.
    correlation
        Develop a correlation between time-series and potentially lags.
    createts
        Create empty time series, optionally fill with a value.
    date_offset
        Apply a date offset to a time-series index.
    date_slice
        Print out data to the screen between start_date and end_date.
    describe
        Print out statistics for the time-series.
    dtw
        Dynamic Time Warping.
    equation
        Apply <equation_str> cto the time series data.
    ewm_window
        Calculate exponential weighted functions.
    expanding_window
        Calculate an expanding window statistic.
    fill
        Fill missing values (NaN) with different methods.
    filter
        Apply different filters to the time-series.
    fit
        Fit model to data.
    forecast
        Forecast algorithms
    read
        Combines time-series from a list of pickle or csv files.
    gof
        Will calculate goodness of fit statistics between two time-series.
    normalization
        Return the normalization of the time series.
    pca
        Return the principal components analysis of the time series.
    pct_change
        Return the percent change between times.
    peak_detection
        Peak and valley detection.
    pick
        DEPRECATED: Will pick a column or list of columns from input
    plot
        Plot data.
    rank
        Compute numerical data ranks (1 through n) along axis.
    regression
        Regression of one or more time-series or indices to a time-series.
    remove_trend
        Remove a 'trend'.
    replace
        Return a time-series replacing values with others.
    rolling_window
        Calculate a rolling window statistic.
    stack
        Return the stack of the input table.
    stdtozrxp
        Print out data to the screen in a WISKI ZRXP format.
    tstopickle
        Pickle the data into a Python pickled file.
    unstack
        Return the unstack of the input table.
    about
        Display version number and system information.

    optional arguments:
      -h, --help            show this help message and exit

The default for all of the subcommands is to accept data from stdin (typically
a pipe).  If a subcommand accepts an input file for an argument, you can use
"--input_ts=input_file_name.csv", or to explicitly specify from stdin (the
default) "--input_ts='-'".

For the subcommands that output data it is printed to the screen and you can
then redirect to a file.

Usage - API
-----------
You can use all of the command line subcommands as functions.  The function
signature is identical to the command line subcommands.  The return is always
a PANDAS DataFrame.  Input can be a CSV or TAB separated file, or a PANDAS
DataFrame and is supplied to the function via the 'input_ts' keyword.

Simply import tstoolbox::

    import tstoolbox

    # Then you could call the functions
    ntsd = tstoolbox.fill(method='linear', input_ts='tests/test_fill_01.csv')

    # Once you have a PANDAS DataFrame you can use that as input to other
    # tstoolbox functions.
    ntsd = tstoolbox.aggregate(statistic='mean', groupby='D', input_ts=ntsd)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tstoolbox",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "time-series, cli-app, aggregate, fill, filter",
    "author": null,
    "author_email": "Tim Cera <tim@cerazone.net>",
    "download_url": "https://files.pythonhosted.org/packages/06/b1/40f44f40a0aa2b3562fc29af0b28ccc4f0713c85d781e3539f016c98bba4/tstoolbox-108.1.1.tar.gz",
    "platform": null,
    "description": ".. image:: https://github.com/timcera/tstoolbox/actions/workflows/python-package.yml/badge.svg\n    :alt: Tests\n    :target: https://github.com/timcera/tstoolbox/actions/workflows/python-package.yml\n    :height: 20\n\n.. image:: https://img.shields.io/coveralls/github/timcera/tstoolbox\n    :alt: Test Coverage\n    :target: https://coveralls.io/r/timcera/tstoolbox?branch=master\n    :height: 20\n\n.. image:: https://img.shields.io/pypi/v/tstoolbox.svg\n    :alt: Latest release\n    :target: https://pypi.python.org/pypi/tstoolbox/\n    :height: 20\n\n.. image:: http://img.shields.io/pypi/l/tstoolbox.svg\n    :alt: BSD-3 clause license\n    :target: https://pypi.python.org/pypi/tstoolbox/\n    :height: 20\n\n.. image:: http://img.shields.io/pypi/dd/tstoolbox.svg\n    :alt: tstoolbox downloads\n    :target: https://pypi.python.org/pypi/tstoolbox/\n    :height: 20\n\n.. image:: https://img.shields.io/pypi/pyversions/tstoolbox\n    :alt: PyPI - Python Version\n    :target: https://pypi.org/project/tstoolbox/\n    :height: 20\n\ntstoolbox - Quick Guide\n=======================\nThe tstoolbox is a Python script to manipulate time-series on the command line\nor by function calls within Python.  Uses pandas (http://pandas.pydata.org/)\nor numpy (http://numpy.scipy.org) for any heavy lifting.\n\nInstallation\n------------\nShould be as easy as running ``pip install tstoolbox`` or\n``easy_install tstoolbox`` at any command line.  Not sure on Windows whether\nthis will bring in pandas, but as mentioned above, if you start with scientific\nPython distribution then you shouldn't have a problem.\n\nUsage - Command Line\n--------------------\nJust run 'tstoolbox --help' to get a list of subcommands::\n\n\n    usage: tstoolbox [-h]\n                     {accumulate, add_trend, aggregate, calculate_fdc,\n                     calculate_kde, clip, convert, convert_index,\n                     convert_index_to_julian, converttz, lag, correlation,\n                     createts, date_offset, date_slice, describe, dtw,\n                     equation, ewm_window, expanding_window, fill, filter, fit,\n                     forecast, read, gof, normalization, pca, pct_change,\n                     peak_detection, pick, plot, rank, regression,\n                     remove_trend, replace, rolling_window, stack, stdtozrxp,\n                     tstopickle, unstack, about} ...\n\n    positional arguments:\n      {accumulate, add_trend, aggregate, calculate_fdc, calculate_kde, clip,\n      convert, convert_index, convert_index_to_julian, converttz, lag,\n      correlation, createts, date_offset, date_slice, describe, dtw, equation,\n      ewm_window, expanding_window, fill, filter, fit, forecast, read, gof,\n      normalization, pca, pct_change, peak_detection, pick, plot, rank,\n      regression, remove_trend, replace, rolling_window, stack, stdtozrxp,\n      tstopickle, unstack, about}\n\n    accumulate\n        Calculate accumulating statistics.\n    add_trend\n        Add a trend.\n    aggregate\n        Take a time series and aggregate to specified frequency.\n    calculate_fdc\n        Return the frequency distribution curve.\n    calculate_kde\n        Return the kernel density estimation (KDE) curve.\n    clip\n        Return a time-series with values limited to [a_min, a_max].\n    convert\n        Convert values of a time series by applying a factor and offset.\n    convert_index\n        Convert datetime to/from Julian dates from different epochs.\n    convert_index_to_julian\n        DEPRECATED: Use convert_index instead.\n    converttz\n        Convert the time zone of the index.\n    lag\n        Create a series of lagged time-series.\n    correlation\n        Develop a correlation between time-series and potentially lags.\n    createts\n        Create empty time series, optionally fill with a value.\n    date_offset\n        Apply a date offset to a time-series index.\n    date_slice\n        Print out data to the screen between start_date and end_date.\n    describe\n        Print out statistics for the time-series.\n    dtw\n        Dynamic Time Warping.\n    equation\n        Apply <equation_str> cto the time series data.\n    ewm_window\n        Calculate exponential weighted functions.\n    expanding_window\n        Calculate an expanding window statistic.\n    fill\n        Fill missing values (NaN) with different methods.\n    filter\n        Apply different filters to the time-series.\n    fit\n        Fit model to data.\n    forecast\n        Forecast algorithms\n    read\n        Combines time-series from a list of pickle or csv files.\n    gof\n        Will calculate goodness of fit statistics between two time-series.\n    normalization\n        Return the normalization of the time series.\n    pca\n        Return the principal components analysis of the time series.\n    pct_change\n        Return the percent change between times.\n    peak_detection\n        Peak and valley detection.\n    pick\n        DEPRECATED: Will pick a column or list of columns from input\n    plot\n        Plot data.\n    rank\n        Compute numerical data ranks (1 through n) along axis.\n    regression\n        Regression of one or more time-series or indices to a time-series.\n    remove_trend\n        Remove a 'trend'.\n    replace\n        Return a time-series replacing values with others.\n    rolling_window\n        Calculate a rolling window statistic.\n    stack\n        Return the stack of the input table.\n    stdtozrxp\n        Print out data to the screen in a WISKI ZRXP format.\n    tstopickle\n        Pickle the data into a Python pickled file.\n    unstack\n        Return the unstack of the input table.\n    about\n        Display version number and system information.\n\n    optional arguments:\n      -h, --help            show this help message and exit\n\nThe default for all of the subcommands is to accept data from stdin (typically\na pipe).  If a subcommand accepts an input file for an argument, you can use\n\"--input_ts=input_file_name.csv\", or to explicitly specify from stdin (the\ndefault) \"--input_ts='-'\".\n\nFor the subcommands that output data it is printed to the screen and you can\nthen redirect to a file.\n\nUsage - API\n-----------\nYou can use all of the command line subcommands as functions.  The function\nsignature is identical to the command line subcommands.  The return is always\na PANDAS DataFrame.  Input can be a CSV or TAB separated file, or a PANDAS\nDataFrame and is supplied to the function via the 'input_ts' keyword.\n\nSimply import tstoolbox::\n\n    import tstoolbox\n\n    # Then you could call the functions\n    ntsd = tstoolbox.fill(method='linear', input_ts='tests/test_fill_01.csv')\n\n    # Once you have a PANDAS DataFrame you can use that as input to other\n    # tstoolbox functions.\n    ntsd = tstoolbox.aggregate(statistic='mean', groupby='D', input_ts=ntsd)\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Command line script and Python library to manipulate time series.",
    "version": "108.1.1",
    "project_urls": {
        "bitbucket": "https://bitbucket.org/timcera/tstoolbox/src/main/",
        "documentation": "https://timcera.bitbucket.io/tstoolbox/docs/index.html#tstoolbox-documentation",
        "github": "https://github.com/timcera/tstoolbox"
    },
    "split_keywords": [
        "time-series",
        " cli-app",
        " aggregate",
        " fill",
        " filter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "076fc95793b8482c68dab7feaa384c9257976038aa4955c26d7d161455fc296c",
                "md5": "d5890d68573d6de7cc444268961c416a",
                "sha256": "7f284ab119193c2d084057cf946451175101d38da5e005067cbd1102f73038e4"
            },
            "downloads": -1,
            "filename": "tstoolbox-108.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d5890d68573d6de7cc444268961c416a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5079185,
            "upload_time": "2024-04-01T01:41:20",
            "upload_time_iso_8601": "2024-04-01T01:41:20.211280Z",
            "url": "https://files.pythonhosted.org/packages/07/6f/c95793b8482c68dab7feaa384c9257976038aa4955c26d7d161455fc296c/tstoolbox-108.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "06b140f44f40a0aa2b3562fc29af0b28ccc4f0713c85d781e3539f016c98bba4",
                "md5": "6d4780b70b619417b721aaacdcdac38e",
                "sha256": "64b0b83b46cdc922b4d0f526454b62bc05a96c30ab7c64c01d4e42338162a707"
            },
            "downloads": -1,
            "filename": "tstoolbox-108.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6d4780b70b619417b721aaacdcdac38e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6626021,
            "upload_time": "2024-04-01T01:41:06",
            "upload_time_iso_8601": "2024-04-01T01:41:06.178439Z",
            "url": "https://files.pythonhosted.org/packages/06/b1/40f44f40a0aa2b3562fc29af0b28ccc4f0713c85d781e3539f016c98bba4/tstoolbox-108.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-01 01:41:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "timcera",
    "github_project": "tstoolbox",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "tabulate",
            "specs": [
                [
                    ">=",
                    "0.8.6"
                ]
            ]
        },
        {
            "name": "dateparser",
            "specs": [
                [
                    ">=",
                    "0.7.2"
                ]
            ]
        },
        {
            "name": "XlsxWriter",
            "specs": [
                [
                    ">=",
                    "1.3.7"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.19.5"
                ]
            ]
        },
        {
            "name": "plottoolbox",
            "specs": [
                [
                    ">=",
                    "101.4.12"
                ]
            ]
        },
        {
            "name": "cltoolbox",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "statsmodels",
            "specs": [
                [
                    ">=",
                    "0.12.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "6.2.1"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    ">=",
                    "3.7.4.3"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.3.3"
                ]
            ]
        },
        {
            "name": "pyaf",
            "specs": [
                [
                    ">=",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "Pint_Pandas",
            "specs": [
                [
                    ">=",
                    "0.1"
                ]
            ]
        },
        {
            "name": "scikit_learn",
            "specs": [
                [
                    ">=",
                    "0.24.0"
                ]
            ]
        },
        {
            "name": "typical",
            "specs": [
                [
                    ">=",
                    "2.0.33"
                ]
            ]
        }
    ],
    "lcname": "tstoolbox"
}
        
Elapsed time: 0.23955s