22- Pandas DataFrames: Writing/Saving as CSV

preview_player
Показать описание
Visit my personal web-page for the Python code:
Рекомендации по теме
Комментарии
Автор

For anyone needing the data used in the video:

raw_data = {
'city': ['Tripoli', 'Tripoli', 'Rome', 'Rome', 'Sydney', 'Sydney'],
'rank': ['1st', '2nd', '1st', '2nd', '1st', '2nd'],
'name': ['Noureddin', 'Adam', 'Kevin', 'Raihana', 'Raghad', 'Mahdi'],
'score1': [44, 48, 39, 41, 38, 44],
'score2': [67, 63, 55, 70, 64, 77]
}

df = pd.DataFrame(raw_data, columns=['city', 'rank', 'name', 'score1', 'score2'])

DookyButter
Автор

Amazing. I was trying for it really long time. This is the shortest method. Thanks!

laxmanbisht
Автор

Thank you for this video, so timely.

pls what did you press on your keyboard to get more details about the 'to_csv' method?

rilwanopeyemimomodu
Автор

Hi. How do u append a column to an existing data frame in an excel sheet and save it

Kinston
Автор

How to save this file in a tabulated form?? :(

sakshiwahi
Автор

Why not anyone here telling about adding rows. Writing in csv is not just making csv

rishabhsemwal
welcome to shbcf.ru