IniziaInizia gratis

Aggregate with sum

You will deal with an aggregation feature, agg_with_sum(). As you know, pd.DataFrame.groupby() returns a new dataset by aggregating the initial one with some function, in this case - .sum(). But the important thing is that you want to verify it works properly.

Let's assume you know nothing about the data, but you know for sure that agg_with_sum() returns pd.Series. It is also reasonable to assume that the pd.Series will not be empty, and it will also contain some numeric values since it was processed with .sum().

Questo esercizio fa parte del corso

Introduction to Testing in Python

Visualizza il corso

Esercizio pratico interattivo

Passa dalla teoria alla pratica con uno dei nostri esercizi interattivi

Inizia esercizio