in data_measurements/lengths/lengths.py [0:0]
def _write_lengths_cache(self):
# Writes the data structures using the corresponding filetypes.
ds_utils.make_path(pjoin(self.cache_dir, self.lengths_dir))
if self.length_stats_dict != {}:
ds_utils.write_json(self.length_stats_dict, self.length_stats_json_fid)
if isinstance(self.fig_lengths, Figure):
self.fig_lengths.savefig(self.lengths_fig_png_fid)
if isinstance(self.lengths_df, pd.DataFrame):
ds_utils.write_df(self.lengths_df, self.lengths_df_json_fid)