Create New Columns by Calculating the Columns that Already Exists
1. Calculate the columns directly to add a new column There is a DataFrame scores of different subject from 2019 to 2022. You can do various calculations directly by the columns. Below is the codes for the DataFrame. dict_scores = {'Year' : [2019, 2020, 2021, 2022], 'Math' : [80, 70, 90, 100], 'History' : [60, 40, 70, 60], 'Science' : [70, 80, 60, 90]} df_scores = pd.DataFrame(dict_scores) 2. Su..
카테고리 없음
2022. 11. 15. 05:56