Skip to content

Commit

Permalink
Merge 9c78859 into 62edc96
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Oct 15, 2018
2 parents 62edc96 + 9c78859 commit 215f09e
Show file tree
Hide file tree
Showing 5 changed files with 1,169 additions and 448 deletions.
20 changes: 20 additions & 0 deletions PROCESSORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ def load(source, name=None, resources=None, **options):
#### printer
Just prints whatever it sees. Good for debugging.

```python
def printer(num_rows=10, last_rows=None, fields=None, resources=None,
header_print=_header_print, table_print=_table_print, **tabulate_kwargs):
pass
```

- `num_rows` - modify the number of rows to preview, printer will print multiple samples of this number of rows from different places in the stream
- `last_rows` - optional, defaults to the value of `num_rows`
- `fields` - optional, list of field names to preview
- `resources` - optional, allows to limit the printed resources, same semantics as `load` processor `resources` argument
- `header_print` - optional, callable used to print each resource header
- `table_print` - optional, callable used to print the table data
- `**tabulate_kwargs` - additional kwargs passed to [tabulate](https://bitbucket.org/astanin/python-tabulate), allows to customize the printed tables

If you are running from a [Jupyter](https://jupyter.org/) notebook, add `tablefmt='html'` to render an html table:

```
printer(tablefmt='html')
```

#### dump_to_path
Store the results to a specified path on disk, in a valid datapackage

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ Type "help", "copyright", "credits" or "license" for more information.

## Learn more

Dive into the [Tutorial](TUTORIAL.md) to get a deeper glimpse into everything that `dataflows` can do.
Dive into the [Tutorial](TUTORIAL.ipynb) to get a deeper glimpse into everything that `dataflows` can do.
Also review this list of [Built-in Processors](PROCESSORS.md), which also includes an API reference for each one of them.
Loading

0 comments on commit 215f09e

Please sign in to comment.