Computer scienceData scienceInstrumentsPandasData preprocessing with pandas

Modifying a DataFrame

Hello, newbie!

Report a typo

You are still working with the penguins_example DataFrame.

A zoologist has informed you that one more penguin inhabits our island. Insert the new data into the dataset:

species bill_length_mm bill_depth_mm
Adelie 45.7 15.5

Note that the DataFrame is already stored in the variable penguins_example, so you just need to insert your code before the print() function call. You don't need to import pandas here.

Sample Input 1:

species	    bill_length_mm	bill_depth_mm
1	Adelie	        41.1	18.2
2	Adelie	        39.6	17.7
3	Chinstrap	50.0	19.5
4	Chinstrap	54.2	20.8
5	Gentoo	        41.7	14.7
6	Gentoo	        45.5	13.9

Sample Output 1:

     species  bill_length_mm  bill_depth_mm
0     Adelie            41.1           18.2
1     Adelie            39.6           17.7
2  Chinstrap            50.0           19.5
3  Chinstrap            54.2           20.8
4     Gentoo            41.7           14.7
5     Gentoo            45.5           13.9
6     Adelie            45.7           15.5
Write a program in Python 3
# Your code here.
# The dataset is already loaded, the variable that contains the DataFrame is called penguins_example

print(penguins_example)
___

Create a free account to access the full topic