From 0665773c1a86b018f79db7983494c198b77620fc Mon Sep 17 00:00:00 2001 From: Bert Palm <bert.palm@ufz.de> Date: Sun, 19 Apr 2020 08:58:53 +0200 Subject: [PATCH] some docu fixes --- dios/dios.py | 72 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/dios/dios.py b/dios/dios.py index 4e9b4f0..1484e00 100644 --- a/dios/dios.py +++ b/dios/dios.py @@ -416,9 +416,9 @@ class DictOfSeries(_DiosBase): def index_of(self, method='all'): """ Return an single index with indices from all columns. - parameter + Parameters ---------- - method: string + method : string * 'all' : get all indices from all columns * 'union' : alias for 'all' * 'shared' : get indices that are present in every columns @@ -588,7 +588,7 @@ class DictOfSeries(_DiosBase): return self.notna(drop_empty=True) def isnull(self, drop_empty=False): - """ Alias, see ``DictOfSeries.isna``. """ + """ Alias, see :ref:`DictOfSeries.isna`. """ return self.isna(drop_empty=drop_empty) def notnull(self, drop_empty=False): @@ -614,32 +614,50 @@ class DictOfSeries(_DiosBase): """ Pretty print a dios. if `method` == `indexed` (default): - every column is represented by a own index and corresponding values + every column is represented by a own index and corresponding values if `method` == `aligned` [2]: - one(!) global index is generated and values from a column appear at - the corresponding index-location. - - Common params : - - max_cols: not more column than `max_cols` are printed [1] - - max_rows: see `min_rows` [1] - - min_rows: not more rows than `min_rows` are printed, if rows of any series exceed `max_rows` [1] - - na_rep: all NaN-values are replaced by `na_rep`. Default `NaN` - - Indexed-Method params: - - empty_series_rep: empty series are represented by the string in `empty_series_rep` - - col_delim: between all columns `col_delim` is inserted. (str) - - header_delim: between the column names (header) and the data, `header_delim` is inserted, - if not None. The string is repeated, up to the width of the column. (str or None). - - Aligned-Method params: - - no_value: value that indicates, that no entry in the underling series is present. Bear in mind - that this should differ from `na_rep`, otherwise you cannot differ missing- from NaN- values. - - Notes: - [1]: defaults to the corresponding value in `dios_options` - [2]: the common-params are directly passed to pd.DataFrame.to_string(..) - under the hood, if method is `aligned` + one(!) global index is generated and values from a column appear at + the corresponding index-location. + + Parameters + --------- + + max_cols : + not more column than `max_cols` are printed [1] + + max_rows : + see `min_rows` [1] + + min_rows : + not more rows than `min_rows` are printed, if rows of any series exceed `max_rows` [1] + + na_rep : + all NaN-values are replaced by `na_rep`. Default `NaN` + + empty_series_rep : + Ignored if not `method='indexed'`. + Empty series are represented by the string in `empty_series_rep` + + col_delim : str + Ignored if not `method='indexed'`. + between all columns `col_delim` is inserted. + + header_delim : + Ignored if not `method='indexed'`. + between the column names (header) and the data, `header_delim` is inserted, + if not None. The string is repeated, up to the width of the column. (str or None). + + no_value : + Ignored if not `method='aligned'`. + value that indicates, that no entry in the underling series is present. Bear in mind + that this should differ from `na_rep`, otherwise you cannot differ missing- from NaN- values. + + Notes + ----- + [1]: defaults to the corresponding value in `dios_options` + [2]: the common-params are directly passed to pd.DataFrame.to_string(..) + under the hood, if method is `aligned` """ if self.empty: -- GitLab