Skip to content

Commit

Permalink
avoid progressbar when loading a single file
Browse files Browse the repository at this point in the history
  • Loading branch information
steinnymir committed Oct 6, 2023
1 parent 9c63996 commit 0fe8475
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sed/loader/flash/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def fill_na(
)

# Forward fill between consecutive dataframes
for i in tqdm(range(1, len(dataframes)), desc='Filling NaNs', leave=True, total=len(dataframes)-1):
for i in tqdm(range(1, len(dataframes)), desc='Filling NaNs', leave=True, total=len(dataframes)-1, disable=len(dataframes)==1):
# Select pulse channels from current dataframe
subset = dataframes[i][channels]
# Find columns with NaN values in the first row
Expand Down Expand Up @@ -788,6 +788,7 @@ def parquet_handler(
data_parquet_dir,
detector,
)
print(parquet_filenames)

# Read all parquet files using dask and concatenate into one dataframe after filling
dataframe = self.fill_na(
Expand Down

0 comments on commit 0fe8475

Please sign in to comment.