I am attempting a data science exercises and I need to use the data from the following link -link to data on github. I read this data with read_html and process it then melt the data into one column, however doing this gives me the error "ValueError: Per-column arrays must each be 1-dimensional". I'm confused because I've tested this on a test data set and it works fine. Is there something distinct about the dataframe created by read_html? I've probed the dataframe in every way I can think of but I can't find an answer. Can someone please explain this to me?
cities = pd.read_html("assets/wikipedia_data.html", skiprows=1)
cities = cities[0].dropna(axis=0, thresh=4)
labels=['city',2,3,4,5,6,7,8,9,10,11,12]
cities.columns = [labels]
cols=[1,2,3,4,9]
cities.drop(cities.columns[cols], axis=1, inplace=True)
cities = cities.melt(id_vars=['City'])