Код: Выделить всё
index Flux_min New_Flux Flux_max
0 0 0.550613 NaN 0.537315
1 1 0.656621 NaN 0.620647
2 2 0.756486 NaN 0.700822
3 3 0.846038 NaN 0.775749
4 4 0.920871 NaN 0.843257
... ... ... ... ...
99997 99997 0.874460 NaN 0.805594
99998 99998 0.801958 NaN 0.743039
99999 99999 0.721355 NaN 0.676436
100000 100000 0.635054 NaN 0.606967
100001 100001 0.552247 NaN 0.535789
Это мой код
Код: Выделить всё
synth_spectra_df = synth_spectra_df.interpolate(method='spline', order=2, axis=1)
Код: Выделить всё
Traceback (most recent call last):
File "spectral_interpolation.py", line 107, in
synth_spectra_df = synth_spectra_df.interpolate(method='spline', order=2, axis=1)
File "/home/fmendez/anaconda3/lib/python3.8/site-packages/pandas/core/generic.py", line 7209, in interpolate
raise ValueError(
ValueError: Index column must be numeric or datetime type when using spline method other than linear. Try setting a numeric or datetime index column before interpolating.
Любая помощь будет очень признательна
Подробнее здесь: https://stackoverflow.com/questions/723 ... ing-pandas
Мобильная версия