diff --git a/web/pandas/community/ecosystem.md b/web/pandas/community/ecosystem.md index 10ac3bccc6137..e6a6b3a8531ca 100644 --- a/web/pandas/community/ecosystem.md +++ b/web/pandas/community/ecosystem.md @@ -345,25 +345,27 @@ which pandas excels. ## IO -### [NTV-pandas](https://github.com/loco-philippe/ntv-pandas)*: A semantic, compact and reversible JSON-pandas converter* +### [NTV-pandas](https://github.com/loco-philippe/ntv-pandas) NTV-pandas provides a JSON converter with more data types than the ones supported by pandas directly. It supports the following data types: + - pandas data types - data types defined in the [NTV format](https://loco-philippe.github.io/ES/JSON%20semantic%20format%20(JSON-NTV).htm) - data types defined in [Table Schema specification](http://dataprotocols.org/json-table-schema/#field-types-and-formats) The interface is always reversible (conversion round trip) with two formats (JSON-NTV and JSON-TableSchema). -*example* +Example: + ```python import ntv_pandas as npd -jsn = df.npd.to_json(table=False) # save df as a JSON-value (format Table Schema if table is True else format NTV ) -df = npd.read_json(jsn) # load a JSON-value as a DataFrame +jsn = df.npd.to_json(table=False) # save df as a JSON-value (format Table Schema if table is True else format NTV ) +df = npd.read_json(jsn) # load a JSON-value as a `DataFrame` -df.equals(npd.read_json(df.npd.to_json(df))) # True in any case, whether table=True or not +df.equals(npd.read_json(df.npd.to_json(df))) # `True` in any case, whether `table=True` or not ``` ### [BCPandas](https://github.com/yehoshuadimarsky/bcpandas)