Skip to content

Commit

Permalink
apply utils to original notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
natam1 committed Jun 6, 2024
1 parent 0795ab3 commit e43b532
Show file tree
Hide file tree
Showing 3 changed files with 1,722 additions and 1,887 deletions.
4 changes: 4 additions & 0 deletions sb125_analyses/corridor_study/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def get_tranist_agency_counts(df, primary_mode_col, transit_mode_col, transit_ag
modes = (df
>>filter(_[primary_mode_col] =="public_transit")
>>count(_[transit_mode_col])>>arrange(-_.n))

modes[transit_mode_col] = modes[transit_mode_col].astype(str)
# modes[transit_agency_col] = modes[transit_agency_col].astype(str)

modes['n_modes_taken'] = modes[transit_mode_col].apply(lambda x: len(x.split()))

return agencies, modes
Expand Down
Loading

0 comments on commit e43b532

Please sign in to comment.