Update page 'Day 1 homework - Xuanyi Wang (Sloetjes)'

xuanyi.wang
2023-03-30 21:01:00 +02:00
parent c841ebc725
commit e6304ba5ec
-3
@@ -53,7 +53,6 @@ df = pd.DataFrame(data)
df['Product'] = df['Number1'] * df['Number2']
print(df)
```
#### Answer:
@@ -107,7 +106,6 @@ s2 = "👩‍👩‍👧‍👧"
print("Size of s1:", sys.getsizeof(s1))
print("Size of s2:", sys.getsizeof(s2))
```
###### Output:
```
@@ -153,7 +151,6 @@ def read_tomato_sales(file_name):
print(f"Total tomato sales: {total_sales}")
read_tomato_sales("tomato_sales_error.csv")
```
#### 2. Given today's conversation about character encodings, describe why you would want to use bytes instead of strings when processing data containing multiple human languages at the same time. Write a small Python function to demonstrate this.