Skip to content

Conversation

@cetienn01
Copy link

No description provided.

@cetienn01
Copy link
Author

Changed Code (data.loc[list(missing_categories), :] = 0):
  • changed: data.loc[missing_categories, :] = 0 to: data.loc[list(missing_categories), :] = 0
  • this change explicitly converts missing_categories to a list before using it to index the DataFrame.
  • This ensures that missing_categories is in a format that loc can correctly interpret as a list of row labels.
  • contributions by @gpmoorhead1

@cetienn01
Copy link
Author

#22 (comment)

jalberge added a commit to jalberge/comut that referenced this pull request Oct 17, 2024
My copy of "added a fix for the 'add_side_bar_data errors with pandas 2.0.0 or higher (issue vanallenlab#22)' vanallenlab#24"
@cetienn01
Copy link
Author

cetienn01 commented Nov 22, 2024

Here are some instructions on how to do this quick fix.

Install comut ** manually ** (NOT using "pip install comut")

  1. create a conda env: conda create -n env_name
  2. activate the conda: conda activate env_name
  3. clone the comut repo from GitHub: gh repo clone vanallenlab/comut
  4. go to the repo folder and open the comut.py file in a text editor (nano, vim, etc)
  5. make the changes i suggested in my PR (in line 1004):

changing the line 1004 -- from: data.loc[missing_categories, :] = 0 to: data.loc[list(missing_categories), :] = 0

  1. go back to the main comut directory (where the setup.py file is located)
  2. install comut manually using: pip install -e .
  3. try using comut again in your code to add the sidebar.

@cetienn01
Copy link
Author

cetienn01 commented Nov 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant