Some functions in pandas are deprecated

Bug #1580447 reported by Masayuki Igawa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Health
Fix Released
Low
Masayuki Igawa

Bug Description

I noticed that some functions in pandas are deprecated.
I think we should replace them with recommended functions.
----------
...../openstack-health/openstack_health/test_run_aggregator.py:79: FutureWarning: how in .resample() is deprecated
the new syntax is .resample(...).mean()
  base.resample_matrix[resample], how='mean')
...../openstack-health/openstack_health/test_run_aggregator.py:86: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with
 Series.rolling(window=20,center=False).mean()
  numeric_df['avg_run_time'] = pd.rolling_mean(numeric_df['run_time'], 20)
...../openstack-health/openstack_health/test_run_aggregator.py:87: FutureWarning: pd.rolling_std is deprecated for Series and will be removed in a future version, replace with
 Series.rolling(window=20,center=False).std()
  numeric_df['stddev_run_time'] = pd.rolling_std(numeric_df['run_time'], 20)
----------

Revision history for this message
Masayuki Igawa (igawa) wrote :
Revision history for this message
Masayuki Igawa (igawa) wrote :

Series.rolling() function isn't in v0.17.x . So we need to upgrade the pandas version in requirements.txt.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-health (master)

Fix proposed to branch: master
Review: https://review.openstack.org/314874

Changed in openstack-health:
assignee: nobody → Masayuki Igawa (igawa)
status: New → In Progress
Changed in openstack-health:
assignee: Masayuki Igawa (igawa) → Matthew Treinish (treinish)
Changed in openstack-health:
assignee: Matthew Treinish (treinish) → Masayuki Igawa (igawa)
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-health (master)

Reviewed: https://review.openstack.org/314874
Committed: https://git.openstack.org/cgit/openstack/openstack-health/commit/?id=4db9a614711a2e52f9c827a9340e7ff7d1882751
Submitter: Jenkins
Branch: master

commit 4db9a614711a2e52f9c827a9340e7ff7d1882751
Author: Masayuki Igawa <email address hidden>
Date: Wed May 11 15:06:20 2016 +0900

    Fix pandas functions warnings

    This commit fixes pandas functions warnings. Some of pandas functions such as
    rolling_mean(), resample(how=xx) are deprecated from v0.18.0.

    Change-Id: I1465e50821af2aaa77d5458205469c4eec1dab58
    Closes-Bug: #1580447

Changed in openstack-health:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.