<jupyter_start><jupyter_text>Dados ausentesVamos mostrar alguns métodos convenientes para lidar com Missing Data em pandas:<jupyter_code>import numpy as np
import pandas as pd
df = pd.DataFrame({'A':[1,2,np.nan],
                  'B':[5,np.nan,np.nan],
                  'C':[1,2,3]})
df
df.dropna()
df.dropna(axis=1)
df.dropna(thresh=2)
df.fillna(value='Conteúdo')
df['A'].fillna(value=df['A'].mean())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17321016166281755, 'fraction_numerical': 0.018475750577367205, 'mean_word_length': 4.636363636363637, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '109833', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 181, 'n_tokens_neox': 175, 'n_words': 30, 'path': 'Utils/Pandas/Dados ausentes.ipynb', 'repo_name': 'ysraell/examples', 'size': '433'}