Skip to content

Commit

Permalink
Print warning when to_feather used.
Browse files Browse the repository at this point in the history
  • Loading branch information
misi9170 committed Sep 3, 2024
1 parent 8a142de commit e05d4c2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion flasc/flasc_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,16 @@ def _convert_wide_to_semiwide(self):
# turbine_id (as specified by the user)
# variable
# value


def to_feather(self, path, **kwargs):
"""Raise warning about lost information and save to feather format."""
print(
"Dataframe will be saved as a pandas DataFrame. "\
"Extra attributes from FlascDataFrame will be lost. "\
"We recommend using df.to_pickle() and pd.read_pickle() instead, "\
"as this will retain FlascDataFrame attributes."
)
return super().to_feather(path, **kwargs)

# Likely this will be used for testing, later but it's convenient for prototyping here
if __name__ == "__main__":
Expand Down

0 comments on commit e05d4c2

Please sign in to comment.