Generation

generate functionFri, 24 Feb 2023

Write a function for the Pandas dataframe that will delete the lines with the names spi_rank and country

import pandas as pd # Create DataFrame df = pd.DataFrame({'spi_rank' : [21,19,20], 'country': ['Australia', 'Canada', 'Chile']}) def function(df): del df['spi_rank'] del df['country'] return df function(df)

Want to kickstart your project?Use the new AI Studio to create your code