You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the naming, it is not really clear whether the unit for pressure refers to absolute or relative pressure. It would be helpful to change the naming to barg (bar gauge) where applicable and use bar_abs where absolute pressure are meant.
As far as I understand, "bar" currently means "barg" but this should be stated in the documentation somewhere.
The text was updated successfully, but these errors were encountered:
It would probably a breaking change, but backward compatibility could be kept with some custom DF modifications, according to a ChatBot:...
import pandas as pd
import warnings
class CustomDataFrame(pd.DataFrame):
@property
def _constructor(self):
return CustomDataFrame
def __getitem__(self, key):
if key == 'old_column_name': # Replace with your old column name
warnings.warn("The column 'old_column_name' is deprecated, use 'new_column_name' instead.", DeprecationWarning)
return super().__getitem__('new_column_name') # Replace with your new column name
return super().__getitem__(key)
def __getattr__(self, attr):
if attr == 'old_column_name': # Replace with your old column name
warnings.warn("The column 'old_column_name' is deprecated, use 'new_column_name' instead.", DeprecationWarning)
return self['new_column_name'] # Replace with your new column name
return super().__getattr__(attr)
# Example usage
data = {'new_column_name': [1, 2, 3]}
df = CustomDataFrame(data)
# Accessing the new column
print(df.new_column_name)
# Accessing the old column (will raise a deprecation warning)
print(df.old_column_name)
From the naming, it is not really clear whether the unit for pressure refers to absolute or relative pressure. It would be helpful to change the naming to barg (bar gauge) where applicable and use bar_abs where absolute pressure are meant.
As far as I understand, "bar" currently means "barg" but this should be stated in the documentation somewhere.
The text was updated successfully, but these errors were encountered: