frictionlessdata / tabulator-py

Python library for reading and writing tabular data via streams.
https://frictionlessdata.io
MIT License
235 stars 42 forks source link

"None" output for null cells #347

Closed aborruso closed 3 years ago

aborruso commented 3 years ago

Overview

Hi, when I run tabulator in this way

tabulator input.ods

I have None as output for every null cells.

A_I_C,X,A_I_C,X,A_I_C,A_I_C,A_I_C,None,None,None

Is it possible to set null cell as output?

Thank you


Please preserve this line to notify @roll (lead of this repository)

roll commented 3 years ago

Hi @aborruso,

Can you please elaborate?

PS. Just curious why do you need to use tabulator not frictionless?

aborruso commented 3 years ago

Hi @roll, I have this example ods file.

One of its sheet is this

FieldA FieldB
1 a
3
d
7 f

If I use tabulator tabulator --sheet "Sheet2" input.ods I have this output

FieldA,FieldB
1,a
3,None
None,d
7,f

I was looking for an option to set what to have in output for null cells. Something like --null "nd". And by default I think it would be better to have null:

FieldA,FieldB
1,a
3,
,d
7,f

I use tabulator because I can set the name of the input sheet.

Thank you

roll commented 3 years ago

It's possible with Frictionless as well:

$ frictionless extract input.ods --dialect '{"sheet": "Sheet2"}'
# ----
# data: /home/roll/input.ods
# ----

======  ======
FieldA  FieldB
======  ======
     1  a
     3
        d
     7  f
======  ======
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.