<jupyter_start><jupyter_text>Pandas(panel data) is python module that is mostly use to read data from different sources(like excel, csv and others) Pandas DataFrameData Frame is a main object in pandas. It is used to represent data with rows and columns.> csv = comma seperated values<jupyter_code>import pandas as pd
df = pd.read_csv('nyc_weather.csv')
df
# get the maximum temparature
df['Temperature'].max()
# to know which data it rain
df['EST'][df['Events'] == "Rain"]
# Average wind seep
df['WindSpeedMPH'].mean()
df.shape
df.head()
df.tail()
# slicing
df[2:5]# from 2 row to 4 row
df.columns
# df.Humidity
# or
df['Humidity']
df[['Humidity','WindSpeedMPH']].head(7)
df['WindSpeedMPH'].describe()
# Select the row which has maximum WindSpeedMPH
df[df.WindSpeedMPH == df.WindSpeedMPH.max()]
# Select only EST which has maximum WindSpeedMPH
df.EST[df.WindSpeedMPH == df.WindSpeedMPH.max()]
# Write DataFrame to csv
df.to_csv('new_onInxed.csv',index=False)
# INSTALL: pip install openpyxl
# write DF to Excel
df.to_excel('new.xlsx',sheet_name='weather_data')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12740604949587533, 'fraction_numerical': 0.00458295142071494, 'mean_word_length': 6.090909090909091, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '460217', 'license': 'Apache-2.0', 'n_tokens_mistral': 405, 'n_tokens_neox': 381, 'n_words': 114, 'path': '.ipynb_checkpoints/Pandas-checkpoint.ipynb', 'repo_name': 'voza95/ML-and-DL-learning', 'size': '1091'}