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

AttributeError: 'DataFrame' object has no attribute 'ix' #31

Closed
sibbl opened this issue Apr 5, 2020 · 9 comments
Closed

AttributeError: 'DataFrame' object has no attribute 'ix' #31

sibbl opened this issue Apr 5, 2020 · 9 comments

Comments

@sibbl
Copy link

sibbl commented Apr 5, 2020

In version 1.0.0 of Pandas, Series.ix and DataFrame.ix was removed, breaking calmap. See https://pandas.pydata.org/docs/whatsnew/v1.0.0.html

However, this method is still used at

ax.set_xticks([by_day.ix[datetime.date(year, i + 1, 15)].week

@markryanandrews
Copy link

the line should be:
ax.set_xticks([by_day.loc[datetime.date(year, i + 1, 15)].week

ix is no longer used in pandas, loc will fix your problem

@aliutkus
Copy link

hi, ok, so I understand we cannot use calmap anymore ? is there a fix ?

@ddm-j
Copy link

ddm-j commented Apr 25, 2020

@aliutkus until the author fixes this problem, you can open up the __init__.py file (for me this is located in C:\Users"username"\anaconda3\site-packages\calmap" and CTRL+F search for ax.set_xticks and replace the line with what @markryanandrews has suggested. I've just updated the line and it is working fine now.

@XiaosongWen
Copy link

@aliutkus until the author fixes this problem, you can open up the __init__.py file (for me this is located in C:\Users"username"\anaconda3\site-packages\calmap" and CTRL+F search for ax.set_xticks and replace the line with what @markryanandrews has suggested. I've just updated the line and it is working fine now.

for those who are not using anaconda, the address is like "C:\Users\username\AppData\Local\Programs\Python\Python38-32\Lib\site-packages"

@asaljalilvand
Copy link

Hi, I also faced this issue, and I found another library,calplot, which says it's a fork of calmap with some fixes. It works for me.

@darkmatter2222
Copy link
Contributor

Opened pull request #34 to fix, emailed @martijnvermaat to pull.

@darkmatter2222
Copy link
Contributor

Resolved with the #34 merge, @martijnvermaat can mark this issue resolved/closed.

@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 creating the issue. 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

No branches or pull requests

9 participants