Skip to content

Commit

Permalink
Merge pull request #197 from UDST/sort_bug
Browse files Browse the repository at this point in the history
Update Pandas sort methods
  • Loading branch information
federicofernandez committed May 9, 2017
2 parents db2000c + 35830be commit a14b287
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v3.1.1
======

2017/5/9

* Updated deprecated `sort` method for Pandas Series and DataFrames

v3.1.0
======

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# The short X.Y version.
version = '3.1'
# The full version, including alpha/beta/rc tags.
release = '3.1.0'
release = '3.1.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ UrbanSim depends on the following libraries, most of which are in Anaconda:
* `matplotlib <http://matplotlib.org>`__ >= 1.3.1
* `numpy <http://numpy.org>`__ >= 1.8.0
* `orca <https://github.com/UDST/orca>`__ >= 1.1
* `pandas <http://pandas.pydata.org>`__ >= 0.15.
* `pandas <http://pandas.pydata.org>`__ >= 0.17.0
* `patsy <http://patsy.readthedocs.org/en/latest/>`__ >= 0.3.0
* `prettytable <https://code.google.com/p/prettytable/>`__ >= 0.7.2
* `pyyaml <http://pyyaml.org/>`__ >= 3.10
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name='urbansim',
version='3.1.0',
version='3.1.1',
description='Tool for modeling metropolitan real estate markets',
long_description=long_description,
author='UrbanSim Inc.',
Expand All @@ -37,7 +37,7 @@
'matplotlib>=1.3.1',
'numpy>=1.8.0',
'orca>=1.1',
'pandas>=0.15.0',
'pandas>=0.17.0',
'patsy>=0.3.0',
'prettytable>=0.7.2',
'pyyaml>=3.10',
Expand Down
2 changes: 1 addition & 1 deletion urbansim/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = version = '3.1.0'
__version__ = version = '3.1.1'
2 changes: 1 addition & 1 deletion urbansim/models/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_sorted_groupby():
df = pd.DataFrame(
{'alpha': np.random.choice(list(letters), 100),
'num': np.random.randint(100)})
sorted_df = df.sort('alpha')
sorted_df = df.sort_values('alpha')

expected = {name: d.to_dict() for name, d in df.groupby('alpha')}
test = {name: d.to_dict()
Expand Down
2 changes: 1 addition & 1 deletion urbansim/utils/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def accounting_sample_no_replace(total, data, accounting_column, prob_column=Non
else:
# weighted shuffle
ran_p = pd.Series(np.power(np.random.rand(len(p)), 1.0 / p), index=data.index)
ran_p.sort(ascending=False)
ran_p.sort_values(ascending=False)
shuff_idx = ran_p.index.values

# get the initial sample
Expand Down

0 comments on commit a14b287

Please sign in to comment.