Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

mention progress bar usage of read_root in README #76

Merged
merged 1 commit into from
Oct 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@ parts of a single large `DataFrame`.

You can also combine any of the above options at the same time.

Reading in chunks also supports progress bars
```python
from progressbar import ProgressBar
pbar = ProgressBar()
for df in pbar(read_root('bigfile.root', chunksize=100000)):
# process df here

# or
from tqdm import tqdm
for df in tqdm(read_root('bigfile.root', chunksize=100000), unit="chunks"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just changing this to be consistent (and trying out the GitHub suggestion feature).

Suggested change
for df in tqdm(read_root('bigfile.root', chunksize=100000), unit="chunks"):
for df in tqdm(read_root('bigfile.root', chunksize=100000), unit='chunks'):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I don't have permission to push to this branch I'll merge and apply the suggestion manually.

Thanks for the PR 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i just clicked apply to see if it works

# process df here
```

## Writing ROOT files

`root_pandas` patches the pandas DataFrame to have a `to_root` method that allows you to save it into a ROOT file:
Expand Down