crate / cratedb-examples

A collection of clear and concise examples how to work with CrateDB.
Apache License 2.0
8 stars 7 forks source link

Time Series: Some notebooks are not compatible with pandas 2.x #493

Closed amotl closed 2 weeks ago

amotl commented 2 weeks ago

Observations

When running a few notebooks on pandas 2.x, errors like those can be observed:

TypeError: Could not convert string 'BerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlinBerlin' to numeric

-- https://github.com/crate/cratedb-examples/actions/runs/8975962618/job/24651748395?pr=430#step:6:1839 -- https://github.com/crate/cratedb-examples/actions/runs/8975962618/job/24651748121?pr=430#step:6:825

References

Evaluations

Thoughts

It looks like it is a data shape error. Maybe the way the notebooks are working with pandas needs an update when using more recent pandas 2.x? The string repetition flaw reminds me of the famous »Wat« talk by Gary Bernhardt. ;]

Workaround

As a temporary measure, tests stopped including the corresponding notebook. It will get skipped per cfd1a6ce76860, on behalf of the relevant modernization patch.

Time Series: Skip testing notebooks not compatible with pandas 2.x

  • exploratory_data_analysis.ipynb
  • time-series-decomposition.ipynb

They are not ready for pandas 2.x yet, and block others from being upgraded.

Originally posted by @amotl in https://github.com/crate/cratedb-examples/issues/430#issuecomment-2098088632