Comments (5)
It seems one has to retrieve npartitions from original dask dataframe, and pass it to append.
So I fixed it this way:
collection.append(symbol, df_diff, npartitions=item.data.npartitions)
Will it work everytime?
from pystore.
The problem is that dd.from_pandas() checks:
if (npartitions is None) == (chunksize is None): raise ValueError("Exactly one of npartitions and chunksize must be specified.")
So when the append function calls dd.from_pandas(df, npartitions = None) it raises the error but if you call dd.from_pandas(df, npartitions = None, chunksize=100000) it works. Presumably dask is using npartitions = 1 as its default even though the api says npartitions is optional and doesn't list a default.
The code below is what needs to be tweaked. The new variable could be set to use npartitions = 1 (new = dd.from_pandas(data, npartitions=1), since this will be superseded by the passed value after the dataframes are combined. I'm willing to bet Ran comes up with a more elegant solution though.
Lines 180 to 190 in 40de1d5
from pystore.
thank you @flamby
this fix is working and thanks for sharing and saving time for others.
the pystore notebook demo too works only with this fix, else throws an error:
ValueError: Exactly one of npartitions and chunksize must be specified.
great thanks to @ranaroussi for this wonderful library
from pystore.
Thank you to @ranaroussi for this nices libraries and thank you to @flamby who fix this nasty bug in the Windows 10 environment ! I had exactly the same message ("Exactly one of npartitions and chunksize must be specified") and the append was impossible. Now, it's work. Thank you again.
from pystore.
Hello, same here (Win10 environment)!
Thanks for the fix @flamby !
from pystore.
Related Issues (20)
- Append seems to lose data HOT 10
- Symbols containing regex are broken with dask/fastparquet/fsspec HOT 1
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Does append() work on OSX? HOT 3
- how to read all columns but the one use for partition
- Nested Dataframes causes exception
- collection.list_items() with metadata paremeter is showing "*** json.decoder.JSONDecodeError: Expecting value: line 1 column 198 (char 197)" HOT 1
- Append function not working
- Cause of most silent append errors HOT 3
- Multiindex and/or building minute bars HOT 1
- Is append loading the entire data into memory just to append new data ? HOT 1
- .to_pandas() error [can't read parquet file even though there is data in it when i look with parquet viewer] HOT 1
- Pystore Tutorial loading data problem
- issue reading back an item with metadata.json but no "_metadata"
- _updated in metadata use hour instead of minute
- Append lose data : by default remove duplicted indices. HOT 1
- Importing Pystore now gives ''EntryPoints' object has no attribute 'get''. HOT 1
- problem
- Strange path behaviour when using IPython terminal in Spyder
- Append ignores time series index when data is identical? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pystore.