How to handle exceptions with DataFrame.apply()

ساخت وبلاگ

Vote count: 0

I want to DataFrame.apply()dateutil.parser.parse to a pandas dataframe column of date strings, but some cells are NaN, so it raises an exception. What is the pandastyle way to deal with this?

Should I write another function replacing parse() to handle the errors and apply that instead? Deal with it some other way?

asked 21 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 395 تاريخ : شنبه 30 ارديبهشت 1396 ساعت: 11:30

خبرنامه