DataFrame.multiply()

DataFrame.multiply(other, axis='columns', level=None, fill_value=None) [source] Multiplication of dataframe and other, element-wise (binary operator mul). Equivalent to dataframe * other, but with support to substitute a fill_value for missing data in one of the inputs. Parameters: other : Series, DataFrame, or constant axis : {0, 1, ?index?, ?columns?} For Series input, axis to match Series index on fill_value : None or float value, default None Fill missing (NaN) values with this valu

Series.rsub()

Series.rsub(other, level=None, fill_value=None, axis=0) [source] Subtraction of series and other, element-wise (binary operator rsub). Equivalent to other - series, 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 a level, matc

Panel.clip_upper()

Panel.clip_upper(threshold, axis=None) [source] Return copy of input with values above given value(s) truncated. Parameters: threshold : float or array_like axis : int or string axis name, optional Align object with threshold along the given axis. Returns: clipped : same type as input See also clip

MultiIndex.astype()

MultiIndex.astype(dtype, copy=True) [source] Create an Index with values cast to dtypes. The class of a new Index is determined by dtype. When conversion is impossible, a ValueError exception is raised. Parameters: dtype : numpy dtype or pandas type copy : bool, default True By default, astype always returns a newly allocated object. If copy is set to False and internal requirements on dtype are satisfied, the original data is used to create a new Index or the original Index is returned.

DataFrame.mode()

DataFrame.mode(axis=0, numeric_only=False) [source] Gets the mode(s) of each element along the axis selected. Empty if nothing has 2+ occurrences. Adds a row for each mode per label, fills in gaps with nan. Note that there could be multiple values returned for the selected axis (when more than one item share the maximum frequency), which is the reason why a dataframe is returned. If you want to impute missing values with the mode in a dataframe df, you can just do this: df.fillna(df.mode().

pandas.read_fwf()

pandas.read_fwf(filepath_or_buffer, colspecs='infer', widths=None, **kwds) [source] Read a table of fixed-width formatted lines into DataFrame Also supports optionally iterating or breaking of the file into chunks. Additional help can be found in the online docs for IO Tools. Parameters: filepath_or_buffer : str, pathlib.Path, py._path.local.LocalPath or any object with a read() method (such as a file handle or StringIO) The string could be a URL. Valid URL schemes include http, ftp, s3,

Index.symmetric_difference()

Index.symmetric_difference(other, result_name=None) [source] Compute the symmetric difference of two Index objects. It?s sorted if sorting is possible. Parameters: other : Index or array-like result_name : str Returns: symmetric_difference : Index Notes symmetric_difference contains elements that appear in either idx1 or idx2 but not both. Equivalent to the Index created by idx1.difference(idx2) | idx2.difference(idx1) with duplicates dropped. Examples >>> idx1 = Index([1, 2, 3

DataFrame.mean()

DataFrame.mean(axis=None, skipna=None, level=None, numeric_only=None, **kwargs) [source] Return the mean of the values for the requested axis Parameters: axis : {index (0), columns (1)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int or level name, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a Series numeric_only : boolean, default None Include only floa

MultiIndex.value_counts()

MultiIndex.value_counts(normalize=False, sort=True, ascending=False, bins=None, dropna=True) [source] Returns object containing counts of unique values. The resulting object will be in descending order so that the first element is the most frequently-occurring element. Excludes NA values by default. Parameters: normalize : boolean, default False If True then the object returned will contain the relative frequencies of the unique values. sort : boolean, default True Sort by values ascen

Panel4D.tz_convert()

Panel4D.tz_convert(tz, axis=0, level=None, copy=True) [source] Convert tz-aware axis to target time zone. Parameters: tz : string or pytz.timezone object axis : the axis to convert level : int, str, default None If axis ia a MultiIndex, convert a specific level. Otherwise must be None copy : boolean, default True Also make a copy of the underlying data Raises: TypeError If the axis is tz-naive.