Giter VIP home page Giter VIP logo

Comments (1)

gnzsnz avatar gnzsnz commented on May 25, 2024

I can't reproduce your issue, but I get something quite similar. basically after an append the index get out of order. data is OKish, but not the index.

is a small file this is not an issue as results can be sorted, but on large files it's very slow

import pandas as pd
import pystore

# create new store
pystore.set_path(path='/tmp/store')
store = pystore.store(datastore='datastore', engine='pyarrow')
test_eod = store.collection(collection='TEST.EOD')

# generate sample data
df = pd.DataFrame(
      list(range(10)), index=pd.date_range(start='2020-1-1', periods=10), columns=['data']
)
df
            data
2020-01-01     0
2020-01-02     1
2020-01-03     2
2020-01-04     3
2020-01-05     4
2020-01-06     5
2020-01-07     6
2020-01-08     7
2020-01-09     8
2020-01-10     9
# generate 2 overlaping sets of data
dfa = df[:-3].copy()
dfb = df[-5:].copy()
# 
dfa
            data
2020-01-01     0
2020-01-02     1
2020-01-03     2
2020-01-04     3
2020-01-05     4
2020-01-06     5
2020-01-07     6

dfb
            data
2020-01-06     5
2020-01-07     6
2020-01-08     7
2020-01-09     8
2020-01-10     9

# write data
test_eod.write('STOCK',data=dfa)
# query data
test_eod.item('STOCK').to_pandas()
            data
2020-01-01     0
2020-01-02     1
2020-01-03     2
2020-01-04     3
2020-01-05     4
2020-01-06     5
2020-01-07     6
# append data
test_eod.append('STOCK',data=dfb)
# query again
test_eod.item('STOCK').to_pandas()
            data
2020-01-03     2
2020-01-04     3
2020-01-08     7
2020-01-01     0
2020-01-02     1
2020-01-05     4
2020-01-06     5
2020-01-07     6
2020-01-09     8
2020-01-10     9

pystore manages overlaping data, so i'm quite sure that's not the issue. The issue seems to be coming from dask, however there's no "sort_index" in dask only sort values and set index, which is not what we need here.

i wonder if this is caused by dask droping support for fastparquet

from pystore.

Related Issues (20)

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.