<jupyter_start><jupyter_text>Analysis Report I
 Importing the database<jupyter_code>import pandas as pd
dados = pd.read_csv("aluguel.csv", sep=";")
dados.head(10)
type(dados)
dados.info()<jupyter_output><class 'pandas.core.frame.DataFrame'>
RangeIndex: 32960 entries, 0 to 32959
Data columns (total 9 columns):
 #   Column      Non-Null Count  Dtype  
---  ------      --------------  -----  
 0   Tipo        32960 non-null  object 
 1   Bairro      32960 non-null  object 
 2   Quartos     32960 non-null  int64  
 3   Vagas       32960 non-null  int64  
 4   Suites      32960 non-null  int64  
 5   Area        32960 non-null  int64  
 6   Valor       32943 non-null  float64
 7   Condominio  28867 non-null  float64
 8   IPTU        22723 non-null  float64
dtypes: float64(3), int64(4), object(2)
memory usage: 2.3+ MB<jupyter_text>General Information about the Database<jupyter_code>tipos_dados = pd.DataFrame(dados.dtypes, columns = ["Tipos de Dados"])
tipos_dados.columns.name = "Variaveis"
tipos_dados
dados.shape # returns a tuple with: total lines x variables
print("A base de dados apresenta {} registros (imóveis) e {} variáveis".format(
    dados.shape[0], dados.shape[1]))<jupyter_output>A base de dados apresenta 32960 registros (imóveis) e 9 variáveis<jupyter_text>**Extras:**<jupyter_code># opening a json file
json = open("aluguel.json")
print(json.read())
df_json = pd.read_json("aluguel.json")
df_json
# opening a txt file
txt = open("aluguel.txt")
print(txt.read())
df_txt = pd.read_table("aluguel.txt") # remember: it's pd.read_table
df_txt
# opening an excel file
df_xlsx = pd.read_excel("aluguel.xlsx") # remember: it's pd.read_excel
df_xlsx
# opening an html file
df_html = pd.read_html("dados_html_1.html") # also works for web pages
df_html<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11790633608815428, 'fraction_numerical': 0.05509641873278237, 'mean_word_length': 3.5513784461152884, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '409615', 'license': 'MIT', 'n_tokens_mistral': 752, 'n_tokens_neox': 682, 'n_words': 171, 'path': 'python-pandas/1-importing-data.ipynb', 'repo_name': 'kdmoreira/data-science-alura', 'size': '1815'}