<jupyter_start><jupyter_text>Estruturas de dados em Pandas  pandas.Series() - 1 Dimensão 2D pandas.DataFrame() - 2 Dimensões 2D pandas.Panel() - 3 Dimensões 3D numpy.ndarray() x Dimensões<jupyter_code>import pandas as pd
import numpy as np
#criação conjuntos rand com pandas
np.random.seed(100)
Serie1 = pd.Series(np.random.rand(10)) ;Serie1
type(Serie1)
import calendar as cal
#criar um calendario com os indexes dos meses 
meses = [cal.month_name[i] for i in np.arange(1,13)]
meses_Series1 = pd.Series(np.arange(1,13), index = meses) ; meses_Series1
meses_Series1.index
#criação de dataset
dict1 = {'US' : 'dollar' , 'UK' : 'pound', 'Germany' : 'euro', 'Brazil' : 'real' , 'China' : 'yuan' , 'Japao' : 'yen'}
#exibição
moeda_Series1 = pd.Series(dict1);moeda_Series1
stockPrices = {'GOOGLE': 1500.82 , 'META' : 582.20 , 'TWTR' : 282.20 , 'AMAZON' : 747.10 , 'AAPLE' : 2072}
stockPricesSeries = pd.Series(stockPrices,
                             index = ['GOOGLE' , 'META' , 'YAHOO' , 'TWTR', 'AMAZON' , 'AAPLE'],
                             name = 'stockPrices')
stockPricesSeries
humanSerie = pd.Series('Human', index = ['Pernas' , 'Tronco','Braços', 'Cabeça' ])
humanSerie<jupyter_output><empty_output><jupyter_text>Operações com Series<jupyter_code>#obtendo um valor
dict1['China']
#Alterar Elementos
stockPricesSeries['GOOGLE'] = 1200
stockPricesSeries['GOOGLE']
stockPricesSeries.get('XPTO', np.NaN)
#returna a partir do 3 indice
stockPricesSeries[3:]
#retorna até o index 3
stockPricesSeries[:3]
#returna valores maior que 600
stockPricesSeries[stockPricesSeries > 600]
#média dos valores
np.mean(stockPricesSeries)
#cálculo de desvio padrão
np.std(stockPricesSeries)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13774912075029308, 'fraction_numerical': 0.03927315357561548, 'mean_word_length': 5.0964285714285715, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, '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': '461753', 'license': 'MIT', 'n_tokens_mistral': 722, 'n_tokens_neox': 655, 'n_words': 151, 'path': 'Pandas/Analise de Dados com Pandas.ipynb', 'repo_name': 'DjCod3r/Jupyter', 'size': '1706'}