CMSTrackerDPG / DQMExplore

A repository with all the data exploration tools for DQM/DC input data
0 stars 4 forks source link

It would be nice to add a check for the input dataframe (me_df) to not be empty, and if empty print a warning. #7

Open gbenelli opened 1 month ago

gbenelli commented 1 month ago

I would add the check as the first line of the generate_me_df function https://github.com/CMSTrackerDPG/DQMExplore/blob/6ee04b84eab9a78c302ffc13e47c8a3096d99a09/src/dqmexplore/dataproc.py#L8

roy-cruz commented 1 month ago

The new MEData class has this function as one of its methods, so this issue is still relevant. I added an if statement which checks if len(me_df) == 0 and if its True, it prints out a warning. You can find it in the latest commit in the PR.