I am working with this dataframe in Jupyter notebooks: Dataframe with issue
As you can see the column is a chr datatype. I want to remove all instances of "12:00:00 AM" from this column. I have tried using the gsub function
bbData_sleepDay_clean <- gsub("12:00:00 AM", "", bbData_sleepDay_clean)
but it turns my data frame into this: Messed up output.
I know I can also convert this column into datetime, for which I tried this:
bbData_sleepDay_clean <- as.POSIXct(bbData_sleepDay_clean[[col2]], format="%Y/%/%d")
But I am not experienced with this conversion and it did not work.
Does anyone know a way to approach this?