From 26915a1d4a3e7ec89297dbeb63e8aa350cc316ab Mon Sep 17 00:00:00 2001 From: Gustavo Oliveira Date: Sun, 14 Jun 2020 17:03:26 -0300 Subject: [PATCH] fix .ix indexer removed from pandas 1.0 (#7) * fix .ix indexer deprecated from Pandas 1.0 * removing support for python older than 3.6.1 * removing support for python 3.4 --- .gitignore | 1 + .travis.yml | 5 +++-- calmap/__init__.py | 2 +- setup.py | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index fa254c6..af2c9af 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build dist .cache *.egg-info +.sonarlint \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 8e0b532..a909d3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,10 @@ sudo: false cache: pip python: - '2.7' -- '3.4' - '3.5' - '3.6' +- '3.7' +- '3.8' install: - pip install -r tests/requirements.txt -r doc/requirements.txt - pip install -e . @@ -23,4 +24,4 @@ deploy: skip_cleanup: true on: tags: true - python: '2.7' + python: '3.7' diff --git a/calmap/__init__.py b/calmap/__init__.py index 68e3a93..8ce99ef 100644 --- a/calmap/__init__.py +++ b/calmap/__init__.py @@ -235,7 +235,7 @@ def yearplot( dayticks = range(len(daylabels))[dayticks // 2 :: dayticks] ax.set_xlabel("") - ax.set_xticks([by_day.ix[datetime.date(year, i + 1, 15)].week for i in monthticks]) + ax.set_xticks([by_day.loc[datetime.date(year, i + 1, 15)].week for i in monthticks]) ax.set_xticklabels([monthlabels[i] for i in monthticks], ha="center") ax.set_ylabel("") diff --git a/setup.py b/setup.py index c66fa1f..5458445 100644 --- a/setup.py +++ b/setup.py @@ -46,8 +46,10 @@ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Scientific/Engineering", ], )