<jupyter_start><jupyter_text>What is a DataFrame? 2-Dimensional with 3 principal components =>Rows, Columns and Values Similar to a table in excel sheet Labelled axes- Rows and Columns are labelled Size mutable- size of a dataframe can be changed anytime<jupyter_code>#Create a DataFrame from clipboard
#Data link: https://en.wikipedia.org/wiki/Table_(information)#:~:text=A%20table%20is%20an%20arrangement,signs%2C%20and%20many%20other%20places.
age_df= pd.read_clipboard()
print(age_df)
#Display column names
age_df.columns
#Access one or more columns
age_df["First name"]
age_df[["First name", "Age"]]
#What is NAN value?
#   Null value

#Create a column with NAN values
age_df["rank"]= np.nan
print(age_df)
#Head and Tail functions
age_df.head()
age_df.tail()
#Assign values to a dataframe using...

#1. Numpy

array_1= np.arange(9)
print(array_1)
age_df["rank"]= array_1
print(age_df)
#2.Series

newrank_series= Series([10,11,12], index= [3,5,6])
age_df["rank"]= newrank_series
print(age_df)
#Delete a column
del(age_df["Last name"])
print(age_df)
#Convert dictionary to a dataframe
sample_dict= {
    'company': ["Nestle", "PG"], 
    'profit': [1000, 500]
}

print(sample_dict)
sample_df= DataFrame(sample_dict)
print(sample_df)<jupyter_output>company  profit
0  Nestle    1000
1      PG     500
{'fraction_non_alphanumeric': 0.12442396313364056, 'fraction_numerical': 0.03840245775729647, 'mean_word_length': 5.967914438502674, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '353728', 'license': 'MIT', 'n_tokens_mistral': 510, 'n_tokens_neox': 475, 'n_words': 133, 'path': 'Week 1/Section 3/Pandas DataFrame.ipynb', 'repo_name': 'AjayMukundS/Takenmind-Internship', 'size': '1302'}