Trying to run a code in the jupyter notebook:
location.str.split("\n",expand=True)\
.drop(columns = 1, inplace = True)
but failing to get the desired result. Nothing is happennig, not even the error is popping up.
Whereas, the below code is giving me the desired result:
location = location.str.split("\n",expand=True)\
.drop(columns = 1)
Just want to know the issue!
Just for the reference -
Location used to be a list. Later got converted into a Series. Got splited up using str.split().
if I'm using the code in different code blocks, then it is working fine -
location.str.split("\n",expand=True)
location.drop(columns = 1, inplace=True)