Conversation
roll
commented
Jan 28, 2020
- fixes Ability to skip columns #248
@akariv For example for
{
"fields": [
{
"type": "string",
"name": "sample_id",
"format": "default"
},
{
"type": "string",
"name": "fermentation_id",
"format": "default"
},
{
"type": "string",
"name": "strain_id",
"format": "default"
},
{
"type": "integer",
"name": "time",
"format": "default"
}
]
}
{u'error-count': 1,
u'preset': u'table',
u'table-count': 1,
u'tables': [{u'encoding': 'utf-8',
u'error-count': 1,
u'errors': [{u'code': u'type-or-format-error',
u'column-number': 4,
u'message': u'The value "bad" in row 3 and column 4 is not type "integer" and format "default"',
u'message-data': {u'field_format': u'"default"',
u'field_type': u'"integer"',
u'value': u'"bad"'},
u'row-number': 3}],
u'format': 'csv',
u'headers': [u'sample_id',
u'fermentation_id',
u'strain_id',
u'time'],
u'row-count': 3,
u'schema': u'table-schema',
u'scheme': u'file',
u'source': 'tmp/sample_info.csv',
u'time': 0.008,
u'valid': False}],
u'time': 0.126,
u'valid': False,
u'warnings': []} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me @roll. Just some nitpicking about the docstrings
README.md
Outdated
When passed, ignores all columns | ||
that listed in the given list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "When passed, ignores all columns included in the given list" is more clear
README.md
Outdated
When passed, ignores all columns | ||
that NOT listed in the given list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "When passed, ignores all columns that are NOT included in the given list" is more clear
tabulator/stream.py
Outdated
@@ -74,6 +74,14 @@ class Stream(object): | |||
When True, ignores all columns | |||
that have blank headers. Defaults to False. | |||
|
|||
ignore_listed_headers (List[str], optional): | |||
When passed, ignores all columns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
@amercader |