<jupyter_start><jupyter_text>import pandas<jupyter_code>import pandas as pd<jupyter_output><empty_output><jupyter_text>import Data<jupyter_code>names=["id","Title","Year","rating","votes","length","genres"]
data=pd.read_csv('imdb_top_10000.txt',sep="\t",names=names,index_col=0)<jupyter_output><empty_output><jupyter_text>Exploring Data<jupyter_code>data
# this will print all data.
data.head()
# This will print the first five by defaul.
data.head(2)
# here we just print the first two elements.
data.tail()
# this will print the last five by default.
data.info()
# this will provide us the information about your code.<jupyter_output><empty_output><jupyter_text>Exporting Data1. using commond(data.to_csv("test.csv",header=True,index=True,sep=","))<jupyter_code>data.to_csv("test.csv",header=True,index=True,sep=",")<jupyter_output><empty_output><jupyter_text>Sorting Data with Pandas1. data.sort_values(by='rating', ascending=False)<jupyter_code># here we sort the data from lower to high. lower values show first then high by rating.
data.sort_values(by='rating')
# Here we sort the data from high to lower by rating.
data.sort_values(by='rating', ascending=False)<jupyter_output><empty_output><jupyter_text>Every DataFrame A Painting.1. Create a dictionary<jupyter_code>sample_data = {
   'tv': [230.1, 44.5, 17.2],
   'radio': [37.8, 39.3, 45.9],
   'news': [69.2, 45.1, 69.3],
   'sales': [22.1, 10.4, 9.3]
}<jupyter_output><empty_output><jupyter_text>Pass in sample_data<jupyter_code>data2 = pd.DataFrame(sample_data)<jupyter_output><empty_output><jupyter_text>Display the new data<jupyter_code>data2<jupyter_output><empty_output><jupyter_text>If you want to delete the data2 frame?<jupyter_code>del data2
print(data2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1429384965831435, 'fraction_numerical': 0.029043280182232345, 'mean_word_length': 8.39572192513369, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '259136', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 689, 'n_tokens_neox': 650, 'n_words': 127, 'path': 'Pandas_Commonds.ipynb', 'repo_name': 'Hamid-Ali-99/ONE_MONTH.PY', 'size': '1756'}