<jupyter_start><jupyter_text>Data Science Academy Big Data Real-Time Analytics com Python e Spark Capítulo 3  Pandas - Series<jupyter_code>import sys
import pandas as pd
import numpy as np
print(sys.version)
pd.__version__

# Se precisar instalar uma versão específica o pandas, use:

# !pip uninstall pandas
# !pip install pandas == 0.23.4<jupyter_output>3.7.3 (default, Mar 27 2019, 16:54:48) 
[Clang 4.0.1 (tags/RELEASE_401/final)]<jupyter_text>Operações com Series<jupyter_code>serie1 = pd.Series(np.arange(26))
serie1
serie1.index
import string
lcase = string.ascii_lowercase
ucase = string.ascii_uppercase
print(lcase, ucase)
lcase = list(lcase)
ucase = list(ucase)
print(lcase)
print(ucase)
serie1.index = lcase
serie1
serie1['f':'r']
serie1['f']<jupyter_output><empty_output><jupyter_text>Aplicando Funções em Series<jupyter_code>import matplotlib.pyplot as plt
%matplotlib inline
np.random.seed(784)
array1 = np.random.randint(1, 30, 40)
array1
dados = pd.Series(array1)
dados
dados = pd.Series(array1, dtype = np.float16)
dados
dados.mean()
dados.median()
dados.mode()
dados.unique()
dados.value_counts()
dados.describe()
dados.hist()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11925042589437819, 'fraction_numerical': 0.041737649063032366, 'mean_word_length': 6.580645161290323, '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': '115234', 'license': 'MIT', 'n_tokens_mistral': 493, 'n_tokens_neox': 463, 'n_words': 103, 'path': 'code/dsa/Big Data Real-Time Analytics com Python e Spark/8-Arquivos-Cap03/07-Cap03-Operacoes-Pandas-Series-Indexacao.ipynb', 'repo_name': 'gortaina/100-Days-Of-ML-Code', 'size': '1174'}