The same table. One new column.¶
The same quickstart example: adding a column keeps the schema consistent across every row. Only Alice receives the value MX.
| name | age |
|---|---|
| Alice | 30 |
| Bob | 25 |
| name | age | country |
|---|---|---|
| Alice | 30 | MX |
| Bob | 25 | None |
The update happens in memory. Saving requires an explicit call; CSV represents the empty value as an empty cell and JSON as null.
-
Install and verify
Use pip or Poetry and confirm the library loads.
-
Start quickly
Load a file, update a cell and export without reading the whole API.
-
Use tested examples
JSON → CSV, XLSX → JSON and Robot workflows covered by tests.
-
Resolve common errors
Missing sheets, unsupported extensions, invalid paths and non-rectangular records.
A cell returns its value
table[0].nombre and table[0]["nombre"] return the same value. Use brackets for names with spaces or collisions such as to_dict.
Introduction¶
pytabify helps technical teams load, validate, update and save tabular data through one contract instead of writing a parser and conversion layer for every format.
It supports Python scripts, fixtures and simple transformations; QA teams using file-based test data; and Robot Framework suites needing stable row and column access.
The problem it solves¶
One API handles reading different formats, keeping column order, updating rows consistently, exporting another format and reusing those operations from Python and Robot. Adding a column keeps all rows synchronized.
Scope
Each column is one flat field. Nested business objects and immediate recording of generated identifiers belong to the test project.
What you can do¶
*** Settings ***
Library Pytabify
*** Test Cases ***
Guardar tabla enriquecida
${records}= Create List
... ${{ {"name": "Alice", "age": 30} }}
... ${{ {"name": "Bob", "age": 25} }}
${table}= Pytabify.Create Data Table From Records ${records}
${table}= Pytabify.Set Data Table Value ${table} 0 country MX
Pytabify.Save Data Table To Json ${table} people.json
Recommended route¶
- Install.
- Complete the quick start.
- Follow Python or Robot examples.
- Consult Python API reference or keyword reference for details.
- Read architecture only when maintaining or extending the library.
Format coverage¶
| Format | Read | Write | Practical note |
|---|---|---|---|
| CSV | Yes | Yes | Values are read as text |
| JSON | Yes | Yes | Preserves supported native types |
| XLSX | Yes | Yes | Reading requires sheet_name |
For round-trips involving int, bool and None, prefer JSON or XLSX. CSV is portable but does not preserve types in the same way.
[{"name": "English", "lang": "en", "link": "/pytabify/", "fragments": {"the-same-table-one-new-column": "the-same-table-one-new-column", "introduction": "introduction", "the-problem-it-solves": "the-problem-it-solves", "what-you-can-do": "what-you-can-do", "recommended-route": "recommended-route", "format-coverage": "format-coverage"}, "current": true}, {"name": "Espa\u00f1ol", "lang": "es", "link": "/pytabify/es/", "fragments": {}, "current": false}]