Series.corr()

Series.corr(other, method='pearson', min_periods=None) [source] Compute correlation with other Series, excluding missing values Parameters: other : Series method : {?pearson?, ?kendall?, ?spearman?} pearson : standard correlation coefficient kendall : Kendall Tau correlation coefficient spearman : Spearman rank correlation min_periods : int, optional Minimum number of observations needed to have a valid result Returns: correlation : float

Panel.asfreq()

Panel.asfreq(freq, method=None, how=None, normalize=False) [source] Convert TimeSeries to specified frequency. Optionally provide filling method to pad/backfill missing values. Parameters: freq : DateOffset object, or string method : {?backfill?/?bfill?, ?pad?/?ffill?}, default None Method to use for filling holes in reindexed Series (note this does not fill NaNs that already were present): ?pad? / ?ffill?: propagate last valid observation forward to next valid ?backfill? / ?bfill?: use N

Caveats and Gotchas

Using If/Truth Statements with pandas pandas follows the numpy convention of raising an error when you try to convert something to a bool. This happens in a if or when using the boolean operations, and, or, or not. It is not clear what the result of >>> if pd.Series([False, True, False]): ... should be. Should it be True because it?s not zero-length? False because there are False values? It is unclear, so instead, pandas raises a ValueError: >>> if pd.Series([False, Tr

DatetimeIndex.to_series()

DatetimeIndex.to_series(keep_tz=False) [source] Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index Parameters: keep_tz : optional, defaults False. return the data keeping the timezone. If keep_tz is True: If the timezone is not set, the resulting Series will have a datetime64[ns] dtype. Otherwise the Series will have an datetime64[ns, tz] dtype; the tz will be preserved. If keep_tz is False: Series will have a d

Panel.dropna()

Panel.dropna(axis=0, how='any', inplace=False) [source] Drop 2D from panel, holding passed axis constant Parameters: axis : int, default 0 Axis to hold constant. E.g. axis=1 will drop major_axis entries having a certain amount of NA data how : {?all?, ?any?}, default ?any? ?any?: one or more values are NA in the DataFrame along the axis. For ?all? they all must be. inplace : bool, default False If True, do operation inplace and return None. Returns: dropped : Panel

Series.floordiv()

Series.floordiv(other, level=None, fill_value=None, axis=0) [source] Integer division of series and other, element-wise (binary operator floordiv). Equivalent to series // other, but with support to substitute a fill_value for missing data in one of the inputs. Parameters: other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across

Panel4D.sample()

Panel4D.sample(n=None, frac=None, replace=False, weights=None, random_state=None, axis=None) [source] Returns a random sample of items from an axis of object. New in version 0.16.1. Parameters: n : int, optional Number of items from axis to return. Cannot be used with frac. Default = 1 if frac = None. frac : float, optional Fraction of axis items to return. Cannot be used with n. replace : boolean, optional Sample with or without replacement. Default = False. weights : str or ndarr

Index.slice_indexer()

Index.slice_indexer(start=None, end=None, step=None, kind=None) [source] For an ordered Index, compute the slice indexer for input labels and step Parameters: start : label, default None If None, defaults to the beginning end : label, default None If None, defaults to the end step : int, default None kind : string, default None Returns: indexer : ndarray or slice Notes This function assumes that the data is sorted, so use at your own peril

DatetimeIndex.slice_locs()

DatetimeIndex.slice_locs(start=None, end=None, step=None, kind=None) [source] Compute slice locations for input labels. Parameters: start : label, default None If None, defaults to the beginning end : label, default None If None, defaults to the end step : int, defaults None If None, defaults to 1 kind : {?ix?, ?loc?, ?getitem?} or None Returns: start, end : int

Panel4D.get()

Panel4D.get(key, default=None) [source] Get item from object for given key (DataFrame column, Panel slice, etc.). Returns default value if not found. Parameters: key : object Returns: value : type of items contained in object