0

I have a data from excel looks like below where there are 2 merged cells as "London" and "New York". enter image description here

 import pandas as pd
 import numpy as np
 df = pd.read_excel (r'file locaion.xlsx')

 df = df.reset_index(drop=True)
 df = df.fillna(method='ffill', axis=1)
 df.head()

Now the result enter image description here

Any idea how can I turn all unnamed items with correct location name?

My code does not work.... Any idea how can I turn all unnamed items with the correct location name London London New York New York?

PJL
  • 21
  • 3

0 Answers0