Skip to content

Commit a6893c1

Browse files
add ntv-pandas to the ecosystem (#55421)
* Create 0007-compact-and-reversible-JSON-interface.md * change PDEP number (7 -> 12) * Add FAQ to the PDEPS 0012 * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * pre-commit codespell * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * delete summary * delete mermaid flowchart * with summary, without mermaid flowchart * rename Annexe -> Appendix * add tableschema specification * add orient="table" * Add Table Schema extension * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * Update 0012-compact-and-reversible-JSON-interface.md * add 'ntv-pandas' in the 'ecosystem' file * Update ecosystem.md * Update ecosystem.md * Update ecosystem.md
1 parent 40c2d4d commit a6893c1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

web/pandas/community/ecosystem.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,27 @@ which pandas excels.
345345

346346
## IO
347347

348+
### [NTV-pandas](https://github.com/loco-philippe/ntv-pandas)*: A semantic, compact and reversible JSON-pandas converter*
349+
350+
NTV-pandas provides a JSON converter with more data types than the ones supported by pandas directly.
351+
352+
It supports the following data types:
353+
- pandas data types
354+
- data types defined in the [NTV format](https://loco-philippe.github.io/ES/JSON%20semantic%20format%20(JSON-NTV).htm)
355+
- data types defined in [Table Schema specification](http://dataprotocols.org/json-table-schema/#field-types-and-formats)
356+
357+
The interface is always reversible (conversion round trip) with two formats (JSON-NTV and JSON-TableSchema).
358+
359+
*example*
360+
```python
361+
import ntv_pandas as npd
362+
363+
jsn = df.npd.to_json(table=False) # save df as a JSON-value (format Table Schema if table is True else format NTV )
364+
df = npd.read_json(jsn) # load a JSON-value as a DataFrame
365+
366+
df.equals(npd.read_json(df.npd.to_json(df))) # True in any case, whether table=True or not
367+
```
368+
348369
### [BCPandas](https://github.com/yehoshuadimarsky/bcpandas)
349370

350371
BCPandas provides high performance writes from pandas to Microsoft SQL Server,

0 commit comments

Comments
 (0)