From 49fbfda82df441f396b614bae551682e69799af8 Mon Sep 17 00:00:00 2001 From: Paul Seyfert Date: Mon, 29 Oct 2018 10:23:50 +0100 Subject: [PATCH] mention progress bar usage of read_root in README --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 3300685..c698317 100644 --- a/README.md +++ b/README.md @@ -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"): + # 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: