here is my dataFrame:
Ordered Items ord_datetime Delivered At1 Delivered
13 39 2018-01-25 14:11:06 "25-01-2018 16:40 pm" None
14 20 2018-01-25 10:53:41 "25-01-2018 14:26 pm" None
15 13 2018-01-22 19:53:26 "22-01-2018 21:09 pm" None
16 11 2018-01-22 17:41:20 "" None
i want delete that empty string , i used many syntax but i don't know , i can't do this
Output:after applying df.head().to_dict()
{13: ' "25-01-2018 16:40 pm"',
14: ' "25-01-2018 14:26 pm"',
15: ' "22-01-2018 21:09 pm"',
16: ' ""',
17: ' "21-01-2018 21:56 pm"'}
things i tried
- try to find empty string using this
((df1.values == "").sum())
but it returns0
- try to find empty string using this
- then replace
""
withNaN
but it replace all the valueNAN
- then replace
desire output:
13 "25-01-2018 16:40 pm"
14 "25-01-2018 14:26 pm"
15 "22-01-2018 21:09 pm"
17 "21-01-2018 21:56 pm"