feat: pandas DataFrames with Corr columns can now also be imported and

exported.
This commit is contained in:
Fabian Joswig 2022-06-30 15:26:31 +01:00
parent c7c1725667
commit 153cc795b8
2 changed files with 14 additions and 2 deletions

View file

@ -17,3 +17,14 @@ def test_df_export_import(tmp_path):
pe.input.pandas.load_df((tmp_path / 'df_output.csv').as_posix(), gz=gz)
def test_df_Corr(tmp_path):
my_corr = pe.Corr([pe.pseudo_Obs(-0.48, 0.04, "test"), pe.pseudo_Obs(-0.154, 0.03, "test")])
my_dict = {"int": 1,
"float": -0.01,
"Corr": my_corr}
my_df = pd.DataFrame([my_dict] * 5)
pe.input.pandas.dump_df(my_df, (tmp_path / 'df_output').as_posix())
reconstructed_df = pe.input.pandas.load_df((tmp_path / 'df_output').as_posix(), auto_gamma=True)