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

resolve deprecated problem of pandas #10

Closed
wants to merge 1 commit into from
Closed

resolve deprecated problem of pandas #10

wants to merge 1 commit into from

Conversation

lyltj2010
Copy link

I got the following warning and make this patch.
/usr/local/lib/python2.7/site-packages/calmap/init.py:295: FutureWarning: how in .resample() is deprecated
the new syntax is .resample(...).sum()

by_day = data.resample('D', how=how)

data.resample('D', how=how) is deprecated and use data.resample('D').sum() instead.

I got the following warning and make this patch.  
/usr/local/lib/python2.7/site-packages/calmap/__init__.py:295: FutureWarning: how in .resample() is deprecated
the new syntax is .resample(...).sum()
  # by_day = data.resample('D', how=how)

`data.resample('D', how=how)` is deprecated and use `data.resample('D').sum()` instead.
@martijnvermaat
Copy link
Owner

Thanks for the patch @lyltj2010 😃

This is missing two things:

  1. The old resample API is used in both yearplot and calendarplot.
  2. The how argument to these functions is now ignored.

Also, this removes a warning on Pandas 0.18 and up, while it breaks compatibility with versions below that. I think that's a bit too rough.

@martijnvermaat
Copy link
Owner

@lyltj2010
Copy link
Author

got it >-_-<

@lyltj2010 lyltj2010 closed this Jul 5, 2016
@martijnvermaat
Copy link
Owner

Well, eventually this needs to be fixed so I'll leave this open for tracking the issue.

@martijnvermaat martijnvermaat reopened this Jul 5, 2016
martijnvermaat added a commit that referenced this pull request Dec 14, 2016
@abhimanyu-bitsgoa
Copy link

Great patch!

@MarvinT
Copy link

MarvinT commented Jul 10, 2021

Hi, if this problem still exists and you'd like to create a PR to fix it please direct it to https://github.com/MarvinT/calmap/
That is the version that gets published to pypi and has received several updates to fix some existing issues.

@martijnvermaat
Copy link
Owner

Thank you for your contribution. Unfortunately I don't have the time to maintain this project. As per @MarvinT 's comment, please see https://github.com/MarvinT/calmap/ instead.

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.

None yet

4 participants