Issue: AttributeError with get_values() in read_csv_dataset Function
Description
I encountered an AttributeError while running the read_csv_dataset function in input_output.py. The error specifically pointed to the use of get_values() with a pandas Index object:
AttributeError: 'Index' object has no attribute 'get_values'
Environment
- Python version: 3.8.0
- Pandas version: 0.25.3
Cause
The get_values() method was removed from pandas, starting with later versions. Since I am using an older version of pandas (0.25.3), the code ran into compatibility issues.
Solution
I resolved the issue by modifying the following lines in input_output.py:
# Old code
return [dataset_dataframe.columns.get_values().tolist()] + dataset_dataframe.get_values().tolist(), dataset_dataframe_version
# Updated code
return [dataset_dataframe.columns.to_list()] + dataset_dataframe.to_numpy().tolist(), dataset_dataframe_version
Issue: AttributeError with
get_values()inread_csv_datasetFunctionDescription
I encountered an
AttributeErrorwhile running theread_csv_datasetfunction ininput_output.py. The error specifically pointed to the use ofget_values()with a pandasIndexobject:AttributeError: 'Index' object has no attribute 'get_values'
Environment
Cause
The
get_values()method was removed from pandas, starting with later versions. Since I am using an older version of pandas (0.25.3), the code ran into compatibility issues.Solution
I resolved the issue by modifying the following lines in
input_output.py: