ValueError: Cannot convert non-finite values (NA or inf) to integer
@mvanhove I get this issue since you asked me to reprocess the sites
Traceback (most recent call last):
File "/home/eprofile/eprofile/script/stratfinder/qc-sf-python/qc_daily_final.py", line 1263, in <module>
sys.exit(main())
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/eprofile/eprofile/script/stratfinder/qc-sf-python/qc_daily_final.py", line 1190, in main
df2["FLAG_QC"] = list(df_day_2["FLAG_QC"].astype(int))
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/pandas/core/generic.py", line 5877, in astype
new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 631, in astype
return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 427, in apply
applied = getattr(b, f)(**kwargs)
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/pandas/core/internals/blocks.py", line 673, in astype
values = astype_nansafe(vals1d, dtype, copy=True)
File "/home/jupyterweb/python_envs/pangeo/lib/python3.8/site-packages/pandas/core/dtypes/cast.py", line 1068, in astype_nansafe
raise ValueError("Cannot convert non-finite values (NA or inf) to integer")
ValueError: Cannot convert non-finite values (NA or inf) to integer
you can reproduce this error by using this command bellow
/home/jupyterweb/python_envs/pangeo/bin/python /home/eprofile/eprofile/script/stratfinder/qc-sf-python/qc_daily_final.py /bdd/E-PROFILE/L2A/palaiseau/2022/2022_10_26/eprofile_L2A_STRATFINDER_palaiseau_chm15k-B_v01_20221026.nc /bdd/E-PROFILE/L2A/palaiseau/2022/2022_10_27/eprofile_L2A_STRATFINDER_palaiseau_chm15k-B_v01_20221027.nc /bdd/E-PROFILE/L2A/palaiseau/2022/2022_10_28/eprofile_L2A_STRATFINDER_palaiseau_chm15k-B_v01_20221028.nc /home/eprofile/eprofile/script/stratfinder/config/settings_STRATfinder_palaiseau_chm15k_B.json /home/eprofile/eprofile/script/stratfinder/qc-sf-python/values_qc.toml /bdd/E-PROFILE/L2B/palaiseau/2022/2022_10_27/eprofile_L2B_STRATFINDER_palaiseau_chm15k-B_v01_20221027.nc
Edited by claplace