<jupyter_start><jupyter_text>Aggregation O pandas oferece algumas opções de agragação que nos permite ter um resumo do dataset.|Aggregation     |Description||----------------|-----------||count()         |Total number of items||first(), last() |First and last item||mean(), median()|Mean and median||min(), max()    |Minimum and maximum||std(), var()    |Standard deviation and variance||mad()           |Mean absolute deviation||prod()          |Product of all items||sum()           |Sum of all items||describe()      |A summary of data: count, mean, standard deviation and quartiles|<jupyter_code>import pandas as pd
import seaborn as sns # Vamos importar o seaborn apenas para utilizar o dataset planet
# No exemplo abaixo vamos contar os valores de cada coluna
planets = sns.load_dataset('planets')
planets.count()<jupyter_output><empty_output><jupyter_text>**Describe**  Com a funçao describe podemos ter um resumo de todo o dataset. Isso pode ser bem útil para termos uma ideia geral dos dados.<jupyter_code># Ignoraremos os valores NA
planets.dropna().describe()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12363636363636364, 'fraction_numerical': 0.0, 'mean_word_length': 4.293269230769231, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '450418', 'license': 'MIT', 'n_tokens_mistral': 334, 'n_tokens_neox': 319, 'n_words': 118, 'path': 'Python/03 Pandas/06.01 Aggregation.ipynb', 'repo_name': 'rdemarqui/Data-Science-B-sico', 'size': '1100'}