@@ -87,11 +87,11 @@ def __repr__(self):
87
87
return self .__str__ ()
88
88
89
89
@property
90
- def df (self ):
90
+ def df (self ) -> pd . DataFrame :
91
91
return self ._df
92
92
93
93
@df .setter
94
- def df (self , value ):
94
+ def df (self , value : pd . DataFrame ):
95
95
"""
96
96
Make sure the data frame is set properly with proper column names
97
97
@@ -129,7 +129,7 @@ def clone(self):
129
129
"""
130
130
return copy .deepcopy (self )
131
131
132
- def from_mth5s (self , mth5_list ):
132
+ def from_mth5s (self , mth5_list ) -> list :
133
133
"""Iterates over mth5s in list and creates one big dataframe
134
134
summarizing the runs
135
135
"""
@@ -146,16 +146,16 @@ def _warn_no_data_runs(self):
146
146
logger .info ("To drop no data runs use `drop_no_data_rows`" )
147
147
148
148
@property
149
- def mini_summary (self ):
149
+ def mini_summary (self ) -> pd . DataFrame :
150
150
"""shows the dataframe with only a few columns for readbility"""
151
151
return self .df [self ._mini_summary_columns ]
152
152
153
153
@property
154
- def print_mini_summary (self ):
154
+ def print_mini_summary (self ) -> str :
155
155
"""Calls minisummary through logger so it is formatted."""
156
156
logger .info (self .mini_summary )
157
157
158
- def drop_no_data_rows (self ):
158
+ def drop_no_data_rows (self ) -> bool :
159
159
"""
160
160
Drops rows marked `has_data` = False and resets the index of self.df
161
161
@@ -190,7 +190,9 @@ def set_sample_rate(self, sample_rate: float, inplace: bool = False):
190
190
return new_rs
191
191
192
192
193
- def extract_run_summary_from_mth5 (mth5_obj , summary_type = "run" ):
193
+ def extract_run_summary_from_mth5 (
194
+ mth5_obj , summary_type : Optional [str ] = "run"
195
+ ):
194
196
"""
195
197
Given a single mth5 object, get the channel_summary and compress it to a
196
198
run_summary.
0 commit comments