Thank you! Glad you liked it, and yes, I totally agree. Many of these pandas methods and functions are super versatile. My main goal for this Pandas Tips series is to show how you can enhance the basic pandas commands to perform lots of useful tasks.
I have a dataset that has [x] in two rows. I have tried different ways to remove these rows but none have worked. I have also tried replacing the values with NaN and tried the dropna function but this has not worked. Does anyone know how I can drop these rows?
Hi there - say you have a dataframe called df and the column with those values is called "col", you could probably do something like this: df = df[df["col"] != "[x]"] That overwrites your current dataframe with a dataframe that excludes rows with "[x]" values in the "col" column.
Great presentation! You showed how really versatile dropna with its different parameter options. Thank you.
Thank you! Glad you liked it, and yes, I totally agree. Many of these pandas methods and functions are super versatile. My main goal for this Pandas Tips series is to show how you can enhance the basic pandas commands to perform lots of useful tasks.
I have a dataset that has [x] in two rows. I have tried different ways to remove these rows but none have worked. I have also tried replacing the values with NaN and tried the dropna function but this has not worked. Does anyone know how I can drop these rows?
Hi there - say you have a dataframe called df and the column with those values is called "col", you could probably do something like this: df = df[df["col"] != "[x]"]
That overwrites your current dataframe with a dataframe that excludes rows with "[x]" values in the "col" column.
What a great video! Thank you so much for your explanation!
Thank you! You are most welcome and thanks for stopping by ☺
Thank you! You explained it very well
Glad it was helpful! Cheers! 😀
Thank you! 👍
Most welcome - cheers! 😄
Mam, im also programmer. I have subscribed your channel
Cheers! 😃
💯
Wow such a nice way to present this topic in data science. Thank you !!
Glad you liked it! 😄
She's back! Thank you!
Awwww yeah! Most welcome 😁