From 7a50ea6feab775228aa371d17269f2dd4589a7eb Mon Sep 17 00:00:00 2001 From: Philippe THOMY Date: Mon, 6 May 2024 18:31:58 +0200 Subject: [PATCH] doc v2.0.0 --- example/README.md | 2 +- ntv_pandas/__init__.py | 6 +----- ntv_pandas/accessors.py | 14 +++++++------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/example/README.md b/example/README.md index a011e94..20039cc 100644 --- a/example/README.md +++ b/example/README.md @@ -2,7 +2,7 @@ Five Notebooks are available: -- [multidimensional example](https://nbviewer.org/github/loco-philippe/ntv-pandas/blob/main/example/example_analysis.ipynb) presents the multidimensional interfaces +- [multidimensional example](https://nbviewer.org/github/loco-philippe/ntv-pandas/blob/main/example/example_multidimensional.ipynb) presents the multidimensional interfaces - [integrity](https://nbviewer.org/github/loco-philippe/ntv-pandas/blob/main/example/example_analysis.ipynb) explains how identify integrity errors in a DataFrame - [json-pandas](https://nbviewer.org/github/loco-philippe/ntv-pandas/blob/main/example/example_json_pandas.ipynb) presents limitations of existing json-pandas interface - [ntv-pandas](https://nbviewer.org/github/loco-philippe/ntv-pandas/blob/main/example/example_ntv_pandas.ipynb) presents the JSON interface diff --git a/ntv_pandas/__init__.py b/ntv_pandas/__init__.py index 259589e..e6fe19d 100644 --- a/ntv_pandas/__init__.py +++ b/ntv_pandas/__init__.py @@ -22,16 +22,12 @@ - `ntv-pandas.ntv_pandas.accessors` : - `ntv-pandas.ntv_pandas.accessors.NpdSeriesAccessor` - - `ntv-pandas.ntv_pandas.accessors.NpdDataFrameAccessor` - - + - `ntv-pandas.ntv_pandas.accessors.NpdDataFrameAccessor` """ -#from pathlib import Path from ntv_pandas.pandas_ntv_connector import DataFrameConnec, SeriesConnec, read_json from ntv_pandas.pandas_ntv_connector import to_json, as_def_type, equals, to_analysis from ntv_pandas.pandas_ntv_connector import from_xarray, from_scipp import ntv_pandas.accessors -#import ntv_pandas.pandas_ntv_connector #path = Path(ntv_pandas.pandas_ntv_connector.__file__).parent diff --git a/ntv_pandas/accessors.py b/ntv_pandas/accessors.py index e881819..c8014c5 100644 --- a/ntv_pandas/accessors.py +++ b/ntv_pandas/accessors.py @@ -67,10 +67,10 @@ def to_xarray(self, **kwargs): *Parameters* - - dims: list of string (default None) - order of dimensions to apply - - **dataset** : Boolean (default True) - if False and a single data_var, + - **dims**: list of string (default None) - order of dimensions to apply + - **dataset**: Boolean (default True) - if False and a single data_var, return a sc.DataArray - - **datagroup** : Boolean (default True) - if True, return a sc.DataGroup + - **datagroup**: Boolean (default True) - if True, return a sc.DataGroup which contains the sc.DataArray/sc.Dataset and the other data else only sc.DataArray/sc.Dataset""" return Xdataset.from_dataframe(self._obj, **kwargs).to_xarray(**kwargs) @@ -81,12 +81,12 @@ def to_scipp(self, **kwargs): *Parameters* - - dims: list of string (default None) - order of dimensions to apply - - **dataset** : Boolean (default True) - if False and a single data_var, + - **dims**: list of string (default None) - order of dimensions to apply + - **dataset**: Boolean (default True) - if False and a single data_var, return a DataArray - - **datagroup** : Boolean (default True) - if True return a DataGroup with + - **datagroup**: Boolean (default True) - if True return a DataGroup with metadata and data_arrays - - **ntv_type** : Boolean (default True) - if True add ntv-type to the name""" + - **ntv_type**: Boolean (default True) - if True add ntv-type to the name""" return Xdataset.from_dataframe(self._obj, **kwargs).to_scipp(**kwargs)