mrcagney / gtfs_kit

A Python library for analyzing GTFS feeds.
MIT License
46 stars 7 forks source link

Fix clean_times deprecation warning #10

Closed praneethd7 closed 2 months ago

praneethd7 commented 2 months ago

Pandas Dataframe.applymap is deprecated since version 2.1.0 which raises a deprecation warning in cleaners.clean_times. Here is a quick fix for the issue😄. All tests seem to pass.

araichev commented 2 months ago

Thanks @praneethd7 . Does your merge request resolve all applymap warnings? Would be great if you could resolve them all in one swoop.

praneethd7 commented 2 months ago

@araichev It's a good idea to resolve all related warnings. I just made the changes. There are no more instances of applymap😄. All tests are passing 🤗

araichev commented 2 months ago

@praneethd7 you could simplify the apply instances to apply the function directly, as in ts[["start_time", "end_time"]] = ts[["start_time", "end_time"]].apply(hp.timestr_to_seconds), no?

Also, could you change the target branch to mrcagney:develop?

araichev commented 2 months ago

Fixed on my end with another minor change now in release 6.1.1. Thanks for your help, @praneethd7 !