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.dropna(axis=0, thresh=4)
cities.columns = [labels]
cities.drop(cities.columns[cols], axis=1, inplace=True)
cities = cities.melt(id_vars=['City'])