int-brain-lab / ONE

Open Neurophysiology Environment
MIT License
17 stars 5 forks source link

Prepare ONE for pandas 3.0 #114

Closed k1o0 closed 9 months ago

k1o0 commented 9 months ago

Ensure no data frames are updated within (i)loc or similar methods: https://pandas.pydata.org/pandas-docs/version/2.2.0/user_guide/copy_on_write.html#copy-on-write

GaelleChapuis commented 9 months ago

Note: Conversion to numpy will create explicit copy

oliche commented 9 months ago

So following on the recommendations above, I've setup my pycharm console with the following code.

import pandas as pd
pd.options.mode.copy_on_write = "warn"

It's a bit disappointing as I didn't receive any warning so far.

k1o0 commented 9 months ago

Looks like we're in the clear! I think I misread it the first time. We don't appear to assign on views in ONE so it should be fine. I'll close this issue for now.