import pandas as pd
import numpy as np
data ={'name':['Kevin', 'Jimmy', 'Jame','Ken','Jenny'],
'email':['abc@gmail.com', 'def@gmail.com', 'ghi@gmail.com', 'jkl@gmail.com','mn@gmail.com'],
'salary':[41000, 39000, 53000, 62000,np.nan]}
employee_df = pd.DataFrame(data)
print(employee_df)
output
刪除欄位
employee_df=employee_df.drop(['salary'],axis=1)
print(employee_df)
output