Giter VIP home page Giter VIP logo

pandas-streaming's Introduction

pandas-streaming: streaming API over pandas

Build Status Windows https://dl.circleci.com/status-badge/img/gh/sdpython/pandas-streaming/tree/main.svg?style=svg https://dev.azure.com/xavierdupre3/pandas_streaming/_apis/build/status/sdpython.pandas_streaming MIT License https://codecov.io/gh/sdpython/pandas-streaming/branch/main/graph/badge.svg?token=0caHX1rhr8 GitHub Issues 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.

pandas-streaming's People

Contributors

sdpython avatar xadupre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pandas-streaming's Issues

Add sdist to PyPI releases

Hi! ๐Ÿ‘‹

Thanks for maintaining this package. I have added pandas-streaming to conda-forge but it was a bit tricky because the PyPI release doesn't contain an sdist.

Could you maybe add an sdist for future releases? That would help me a lot. Thanks! ๐Ÿ˜ƒ

implement read_json

for json organized as rows or not (extension compare to pandas.read_json)

Excited for your project

bonjour - I came across this project working with ElasticSearch + Pandas. Will be looking forward to your work and will hope to contribute changes too

Missing packages: scikit-learn and ijson

Pip doesn't install all required packages. It seems that scikit-learn and ijson are missing.

The steps to demonstrate that scikit-learn is missing:

python -m venv venv
source venv/bin/activate
pip install pandas-streaming
python -c "import pandas_streaming.df"

And, the output:

ModuleNotFoundError: No module named 'sklearn'

The steps to demonstrate that ijson is missing:

pip install scikit-learn
python -c "import pandas_streaming.df"

And, the output:

ModuleNotFoundError: No module named 'ijson'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.