Skip to content

Fix DataFrame.applymap deprecation in CSIIndex._parse_excel#2270

Open
Whning0513 wants to merge 1 commit into
microsoft:mainfrom
Whning0513:fix-applymap-deprecation-174
Open

Fix DataFrame.applymap deprecation in CSIIndex._parse_excel#2270
Whning0513 wants to merge 1 commit into
microsoft:mainfrom
Whning0513:fix-applymap-deprecation-174

Conversation

@Whning0513

Copy link
Copy Markdown

Fix DataFrame.applymap deprecation in CSIIndex._parse_excel

Replace  with .

DataFrame.applymap() was removed in pandas 2.2.0 (replaced by DataFrame.map()
since pandas 1.4.0). This call in CSIIndex._parse_excel at line 174 would
raise AttributeError on pandas >= 2.2.0 when processing index constituent
changes from Excel files.

Note: _parse_table at line 197 and get_new_companies at line 321 already use
.map(), so this brings _parse_excel in line with the rest of the collector.
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