windng
Check-in [852760bfc6]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Keyword percentile_width has been removed from DataFrame.describe().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:852760bfc66fe97a498c40b95fd3a6b2f2c55643
User & Date: goyo 2015-10-19 12:48:53
Context
2015-10-19
12:53
Keyword start cannot be '' in pandas.date_range() check-in: 3c239ab4d0 user: goyo tags: trunk
12:48
Keyword percentile_width has been removed from DataFrame.describe(). check-in: 852760bfc6 user: goyo tags: trunk
2015-08-16
19:44
Deprecate get_dup_dates(). check-in: f41c253630 user: goyo tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to windng/olddataset.py.

105
106
107
108
109
110
111


112
113
114
115
116
117
118
119
    def describe(self, percentile_width=50):
        df = self.data
        expected = (
            (df.index[-1] - df.index[0]).total_seconds() /
            df.index.freq.delta.total_seconds() + 1
        )
        rec_rate = df.count() / expected


        result = df.describe(percentile_width=percentile_width).T
        result['recovery'] = rec_rate
        return result.T

    def speed_dist(self, **kwargs):
        speeds = select(self._df, kind='WS', signal='avg')
        right = int(np.ceil(speeds.max().max()))
        bins = range(right + 1)







>
>
|







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
    def describe(self, percentile_width=50):
        df = self.data
        expected = (
            (df.index[-1] - df.index[0]).total_seconds() /
            df.index.freq.delta.total_seconds() + 1
        )
        rec_rate = df.count() / expected
        percentiles = [0.5 - percentile_width / 200, 0.5,
            0.5 + percentile_width / 200]
        result = df.describe(percentiles=percentiles).T
        result['recovery'] = rec_rate
        return result.T

    def speed_dist(self, **kwargs):
        speeds = select(self._df, kind='WS', signal='avg')
        right = int(np.ceil(speeds.max().max()))
        bins = range(right + 1)