Skip to main content

Streaming operations with pandas.

Project description

https://github.com/sdpython/pandas_streaming/blob/master/_doc/sphinxdoc/source/_static/project_ico.png?raw=true

pandas_streaming: streaming API over pandas

Build status Build Status Windows https://circleci.com/gh/sdpython/pandas_streaming/tree/master.svg?style=svg https://dev.azure.com/xavierdupre3/pandas_streaming/_apis/build/status/sdpython.pandas_streaming https://badge.fury.io/py/pandas_streaming.svg MIT License https://codecov.io/github/sdpython/pandas_streaming/coverage.svg?branch=master GitHub Issues Notebook Coverage Downloads Forks Stars size

pandas_streaming aims at processing big files with pandas, too big to hold in memory, too small to be parallelized with a significant gain. The module replicates a subset of pandas API and implements other functionalities for machine learning.

from pandas_streaming.df import StreamingDataFrame
sdf = StreamingDataFrame.read_csv("filename", sep="\t", encoding="utf-8")

for df in sdf:
    # process this chunk of data
    # df is a dataframe
    print(df)

The module can also stream an existing dataframe.

import pandas
df = pandas.DataFrame([dict(cf=0, cint=0, cstr="0"),
                       dict(cf=1, cint=1, cstr="1"),
                       dict(cf=3, cint=3, cstr="3")])

from pandas_streaming.df import StreamingDataFrame
sdf = StreamingDataFrame.read_df(df)

for df in sdf:
    # process this chunk of data
    # df is a dataframe
    print(df)

It contains other helpers to split datasets into train and test with some weird constraints.

Links:

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

pandas_streaming-0.3.239.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

pandas_streaming-0.3.239-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file pandas_streaming-0.3.239.tar.gz.

File metadata

  • Download URL: pandas_streaming-0.3.239.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pandas_streaming-0.3.239.tar.gz
Algorithm Hash digest
SHA256 c01f9176c7fd171e2a29fd2aa212a822884d4af29fd9a90517320a3a59f6f281
MD5 ae1db65b0e25ae43e00699c6f78b6111
BLAKE2b-256 04e9b162bae9e7761119cfa1f200fc932dedee313451216f58375ef95975166e

See more details on using hashes here.

File details

Details for the file pandas_streaming-0.3.239-py3-none-any.whl.

File metadata

File hashes

Hashes for pandas_streaming-0.3.239-py3-none-any.whl
Algorithm Hash digest
SHA256 b3fbe9c6b1537e1d76c232608eea7f9f10dec0fe0582310e6b16c00a2ab4c250
MD5 c68ceac8eeb10dfacbcffde28fb47e44
BLAKE2b-256 c01aba56ac1cf03435a8f37258a8aed8681edeb4bcb715bbaa4d8f2be8b5c652

See more details on using hashes here.

Supported by

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