Computer scienceData scienceInstrumentsPandasData preprocessing with pandas

Modifying a DataFrame

Growing square

Report a typo

In the sample input, you see a dataset df. Change the dataset so that you get the dataset from the sample output. You don't need to print the resulting DataFrame, just make sure that all the changes are saved in the DataFrame.

Sample Input 1:

        a	b
0	1	2
1	4	5

Sample Output 1:

   a  b  c
0  1  2  3
1  4  5  6
2  7  8  9
Write a program in Python 3
import pandas as pd

df = pd.DataFrame({'a': [1, 4], 'b': [2, 5]})

# Your code here
___

Create a free account to access the full topic