August 2021
Beginner to intermediate
112 pages
1h 29m
English
| Puzzle 24 | Late Addition |
| | import pandas as pd |
| | |
| | df = pd.DataFrame([ |
| | ['Sterling', 83.4], |
| | ['Cheryl', 97.2], |
| | ['Lana', 13.2], |
| | ], columns=['name', 'sum']) |
| | df.late_fee = 3.5 |
| | print(df) |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
This code will print:
| | name sum |
| | 0 Sterling 83.4 |
| | 1 Cheryl 97.2 |
| | 2 Lana 13.2 |
Where did the late_fee column go?
Python’s objects are very dynamic. You ...
Read now
Unlock full access