ccGains icon indicating copy to clipboard operation
ccGains copied to clipboard

ValueError: Use `.rename` to alter labels with a mapper

Open obstler42 opened this issue 6 years ago • 1 comments

Trying to get that working on Ubuntu 18, and when running the example.py, the following errors occur:

Traceback (most recent call last): File "example.py", line 392, in main() File "example.py", line 252, in main log_bags(bf) File "example.py", line 387, in log_bags ' ' + '\n '.join(str(bags).split('\n'))) File "/home/t/.local/lib/python3.6/site-packages/ccgains/bags.py", line 388, in str return self.to_data_frame().to_string( File "/home/t/.local/lib/python3.6/site-packages/ccgains/bags.py", line 385, in to_data_frame axis='columns') File "/home/t/.local/lib/python3.6/site-packages/pandas/util/_decorators.py", line 221, in wrapper return func(*args, **kwargs) File "/home/t/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 1329, in rename_axis raise ValueError("Use .rename to alter labels " "with a mapper.") ValueError: Use .rename to alter labels with a mapper.

Any ideas on how to fix this? thanks!

obstler42 avatar Jul 30 '19 07:07 obstler42

Let me add the fixes here:

.rename_axes has to be changed to .rename in bags.y

.reindex_axis has to be changed to .reindex in reports.py

obstler42 avatar Jul 30 '19 07:07 obstler42