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

BUG Restrict pandas version by Python minor version #37

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ install:
- pip install --upgrade pip setuptools
- pip install -r dev-requirements.txt
- pip install -r requirements.txt
- pip install pandas==0.19 ; python_version==3.5
- pip install -e .
before_script: flake8 civismlext
script:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Fixed ``DataFrameETL`` transformations of ``DataFrame``s with non-trivial
index when preserving ``DataFrame`` output type (#32, #33)
- Add ``pandas`` version restrictions by Python version (#37)
- Fix code which was incompatible with older ``pandas`` version (#37)

## [0.1.7] - 2018-03-27
### Added
Expand Down
2 changes: 1 addition & 1 deletion civismlext/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _flag_nulls(self, X, cols_to_drop):
def _check_sentinels(self, X):
"""Replace default sentinel with random values if the default appears
in the data."""
vals = chain.from_iterable(pd.unique(X[col]).tolist() for
vals = chain.from_iterable(pd.unique(X[col]) for
col in self._cols_to_expand)

while any(u == self._nan_sentinel for u in vals):
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
scikit-learn>=0.18.1,<0.20
scipy>=0.14,<2.0
numpy~=1.10
pandas~=0.19
pandas~=0.19; python_version >= '3.5'
pandas>=0.19,<0.21; python_version == '3.4'
pandas>=0.19,<=0.23; python_version == '2.7'
six~=1.10