pandas best way to add a new row in a already existing dataframe - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: pandas best way to add a new row in a already existing dataframe (/thread-12883.html) |
pandas best way to add a new row in a already existing dataframe - aster - Sep-17-2018 hello, i have a dataframe and i would like to add a new row to it. i am quite confused about which is the best way to do it: I could manage the row to be what i want list, dict, series, dataframe all is possible but which is the best way? to my understanding making a dataframe from a dict (and then add it) should be the most favorite while i am here i have also another doubt about this already working code test = web_scraping.quote(i) page = pd.DataFrame.from_dict(test, orient='index').T df = df.append(page)something says me that the transpose ".T" i am doing isn't necessary if i pass the dict in the right way, but how? |