Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: fix deprecation warnings for .idxmax and .loc[] #526

Merged
merged 5 commits into from
Sep 15, 2023

Conversation

bifbof
Copy link
Collaborator

@bifbof bifbof commented Sep 12, 2023

For idxmax two things got deprecated.

  1. the axis keyword, this was an easy fix
  2. support of columns with only NaT, we relied on this behavior. Thus I needed to rewrite code to handle this.

Further deprecated is df.loc[idx, "col"] = "string"; it creates a new column that defaults to float64, that type then gets upcasted to object when "string" gets filled into the dataframe. To avoid this we have to create the column beforehand with df["col"] = None.

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (d835098) 93.05% compared to head (55a3baf) 93.07%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
+ Coverage   93.05%   93.07%   +0.01%     
==========================================
  Files          34       34              
  Lines        2074     2079       +5     
  Branches      388      389       +1     
==========================================
+ Hits         1930     1935       +5     
  Misses        130      130              
  Partials       14       14              
Files Changed Coverage Δ
trackintel/analysis/location_identification.py 99.09% <100.00%> (+0.04%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@hongyeehh hongyeehh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready for merging from my side. I only have one clarification issue left. After that, you can merge this PR.

@hongyeehh hongyeehh merged commit 89f9a23 into mie-lab:master Sep 15, 2023
7 checks passed
@bifbof bifbof deleted the fix_location_identification branch September 15, 2023 10:09
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.

2 participants