Selecting Columns DataFrame Pandas
0. How to select rows from a DataFrame? 1. Select a Single Column Let's say you have a DataFrame of 4 animals like below. The codes below create the DataFrame. import pandas as pd dict_zoo = {'Name' : ['Panda', 'Rabbit', 'Lion', 'Duck'], 'Food' : ['Carrot', 'Bamboo', 'Meat', 'Fish'], 'Age' : [5, 2, 7, 3], 'Species' : ['Mammals', 'Mammals', 'Mammals', 'Birds']} df_zoo = pd.DataFrame(dict_zoo) You..
카테고리 없음
2022. 11. 12. 16:39