What will be the output of the following code?
import pandas as pd
data = {'Category': ['A', 'A', 'B', 'B', 'C'], 'Value': [5, 15, 25, 35, 45], 'Score': [2, 4, 6, 8, 10]}
df = pd.DataFrame(data)
result = df.groupby('Category').agg({'Value': 'sum', 'Score': 'mean'})
print(result)
What will be the output of the following code?
import pandas as pd
data = {'Category': ['A', 'A', 'B', 'B', 'C'], 'Subcategory': ['X', 'Y', 'X', 'Y', 'X'], 'Value': [10, 20, 30, 40, 50]}
df = pd.DataFrame(data)
result = df.pivot(index='Category', columns='Subcategory', values='Value')
print(result)
Which statement best describes the relationship between grouping and aggregation in data analysis?
Selecciona el error porcentual correspondiente a la derivada numérica en cada versión.
Selecciona los resultados correspondientes de las derivadas analíticas.
Selecciona los resultados correspondientes a las aproximaciones de las derivadas numéricas en cada versión.
If the kettle has a power rating of 2000W, how long (in seconds) will it take to boil the kettle?
Does this seem about right?
How does the energy required to heat the aluminium compare to heating water? Suggest a reason why.
You put just enough water in your electric kettle to make a cup of tea (raise the temperature from 20°C to 100°C). How much energy, in kJ, does this require?
Assume 1 cup = 250 ml, the density of water is 1 kg/L, and that the heat capacity of water is 4184 J kg-1 K-1
Calculate the energy required, in kJ, to raise the temperature of a 0.25 kg block of aluminium from 20°C to 100°C.
Take the specific heat capacity of aluminium to be 904 J kg-1 K-1