Answers for "select few cols from df pandas"

2

select 2 cols from dataframe python pandas

# Convert the dictionary into DataFrame 
df = pd.DataFrame(data)
  
# select two columns
df[['Name', 'Qualification']]
Posted by: Guest on May-10-2021
0

pandas make dataframe from few colums

new = old[['A','C','D']]
Posted by: Guest on October-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language