@@ -145,17 +145,17 @@ def write_tsv(path: Path, data_frame: pd.DataFrame) -> None:
145145async def save_packages_stats (channel_dir : Path , totals : pd .DataFrame ) -> None :
146146 log ("save_packages_stats: %s" , channel_dir .name )
147147 packages_totals = totals .groupby ("package" , sort = True )
148- write_tsv (channel_dir / "packages.tsv" , packages_totals . sum ( "total" ))
148+ write_tsv (channel_dir / "packages.tsv" , packages_totals [ "total" ]. sum ( ))
149149
150150 versions_dir = channel_dir / "versions"
151151 versions_dir .mkdir (parents = True , exist_ok = True )
152152 platforms_dir = channel_dir / "platforms"
153153 platforms_dir .mkdir (parents = True , exist_ok = True )
154154 for package , package_totals in packages_totals :
155155 version_totals = package_totals .groupby (["version" ], sort = False )
156- write_tsv (versions_dir / f"{ package } .tsv" , version_totals . sum ( "total" ))
156+ write_tsv (versions_dir / f"{ package } .tsv" , version_totals [ "total" ]. sum ( ))
157157 subdir_totals = package_totals .groupby (["subdir" ], sort = False )
158- write_tsv (platforms_dir / f"{ package } .tsv" , subdir_totals . sum ( "total" ))
158+ write_tsv (platforms_dir / f"{ package } .tsv" , subdir_totals [ "total" ]. sum ( ))
159159
160160
161161async def save_historic_channel_stats (
@@ -183,7 +183,7 @@ async def save_channel_stats(date: str, channel_name: str, package_names: List[s
183183 await save_historic_channel_stats (date , channel_dir , totals )
184184
185185 subdirs_totals = totals .groupby ("subdir" , sort = True )
186- write_tsv (channel_dir / "subdirs.tsv" , subdirs_totals . sum ( "total" ))
186+ write_tsv (channel_dir / "subdirs.tsv" , subdirs_totals [ "total" ]. sum ( ))
187187
188188 await save_packages_stats (channel_dir , totals )
189189
0 commit comments