Return the mean value of the Array.
Whether to ignore any NaT elements.
Timestamp or Timedelta.
Notes
mean is only defined for Datetime and Timedelta dtypes, not for Period.
Examples
For pandas.DatetimeIndex
:
>>> idx = pd.date_range('2001-01-01 00:00', periods=3) >>> idx DatetimeIndex(['2001-01-01', '2001-01-02', '2001-01-03'], dtype='datetime64[ns]', freq='D') >>> idx.mean() Timestamp('2001-01-02 00:00:00')
>>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit='D') >>> tdelta_idx TimedeltaIndex(['1 days', '2 days', '3 days'], dtype='timedelta64[ns]', freq=None) >>> tdelta_idx.mean() Timedelta('2 days 00:00:00')
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4