You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (1==data.index.nanosecond).any() and"times"notinkwargs:
as it adds the keyword argument 'times' that is forwarded through all functions but not referenced by dask or ParquetWriter. This addition is done when any row-Index has a 1 on the nanosecond-decimal e.g. from measurements or import of data:
importpandasaspdimportnumpyasnpfrompystoreimportstoreindex=pd.date_range('1/1/2024 00:00:00', '1/1/2024 10:00:00', freq='1s')
index+=pd.to_timedelta(np.random.default_rng().integers(low=0, high=10, size=len(index)) , unit='ns') # Generate random fragments such as inaccuracies columns= ["A", "B", "C"]
data=np.random.rand(len(index), len(columns))
df=pd.DataFrame(data=data, index=index, columns=columns)
If you try to save this data to a collection this will fail:
I can't understand why the argument is inserted at this point – does it come from the version where fastparquet was the engine? The majority of users probably won't use a temporal resolution in nanoseconds, but if an entry with 1ns occurs by chance due to inaccuracies, measuring devices or similar, the search for the cause is difficult.
The text was updated successfully, but these errors were encountered:
I stumpled over the following bizarre error when writing data to a collection:
The error is caused by:
After some research I found this line responsible
pystore/pystore/collection.py
Line 123 in db73c64
as it adds the keyword argument 'times' that is forwarded through all functions but not referenced by dask or ParquetWriter. This addition is done when any row-Index has a 1 on the nanosecond-decimal e.g. from measurements or import of data:
If you try to save this data to a collection this will fail:
while rounding the index beforehand will succeed:
I can't understand why the argument is inserted at this point – does it come from the version where fastparquet was the engine? The majority of users probably won't use a temporal resolution in nanoseconds, but if an entry with 1ns occurs by chance due to inaccuracies, measuring devices or similar, the search for the cause is difficult.
The text was updated successfully, but these errors were encountered: