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

Compatibility with Pandas v1.0 #222

Merged
merged 12 commits into from
Mar 23, 2020
Merged

Compatibility with Pandas v1.0 #222

merged 12 commits into from
Mar 23, 2020

Conversation

msoltadeo
Copy link
Contributor

@msoltadeo msoltadeo commented Mar 18, 2020

Make updates for new version of Pandas:

  • Use .reindex() instead of .loc when there are missing values
  • change .as_matrix() for .values

@msoltadeo msoltadeo requested a review from smmaurer March 18, 2020 13:54
@coveralls
Copy link

coveralls commented Mar 18, 2020

Coverage Status

Coverage decreased (-0.1%) to 94.196% when pulling effd3a8 on update_pandas into 79f815a on master.

@smmaurer
Copy link
Member

smmaurer commented Mar 18, 2020

Some more context:

What prompted this PR is that certain syntax was removed in Pandas v1.0, causing parts of urbansim to stop working. (It had been deprecated for a while.)

Travis

In order to get the Travis tests to pass, I went through and fixed some other problems as well:

  • Fixed a DataFrame comparison in a test (61b1d50) -- Pandas changed how DataFrame columns are ordered in one of the past several releases.
  • Replaced an instance of .ix[] (2954eb2); I think this syntax was removed in Pandas v1.0 too.
  • Made minor updates to the Travis script so that the environment can continue installing properly (ipython-notebook -> jupyter, etc).

I had to pin pytest at < 4.0 because of a problem with how some of the unit test fixtures take parameters that I couldn't figure out how to solve. This doesn't affect the library itself, just the procedure for running tests.

AppVeyor

I made similar environment updates for AppVeyor. Those tests run now (no longer blocked by package installation), but fail with a couple of string formatting errors that I'm not sure how to solve but don't seem important.

@janowicz @sablanchard, do you think it's ok if we go ahead and merge this, and open an issue to deal with AppVeyor later?

@smmaurer smmaurer changed the base branch from master to dev March 23, 2020 21:25
@smmaurer
Copy link
Member

Managed to get everything working in AppVeyor; all the tests now pass.

Plan is to merge this into a dev branch, then start another PR with everything necessary for releasing a point update (versioning, docs, etc).

@smmaurer smmaurer changed the title updates for new pandas version Compatibility with Pandas v1.0 Mar 23, 2020
@smmaurer smmaurer merged commit 84e7d3f into dev Mar 23, 2020
@smmaurer smmaurer deleted the update_pandas branch March 23, 2020 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants