<jupyter_start><jupyter_text>Content:  1. Shape;Head:Tail  2. Statistical Measures of the Dataset  3. Rename a column  4. Drop a row, Drop a column  5. Add a row, Add a column<jupyter_code># importing the dependencies
import pandas as pd
import sklearn.datasets
# importing the dataset
breast_cancer = sklearn.datasets.load_breast_cancer()
print(breast_cancer)
# loading the dataset to Pandas DataFrame
df = pd.DataFrame(data = breast_cancer.data,columns=breast_cancer.feature_names)
print(df)
# Shape of the dataframe
df.shape
# head of the dataframe
df.head()
# tail of the dataframe
df.tail()
# statistical measures
df.describe()
# Renaming a column
df1 = df.rename(columns={'mean radius':'radius mean'})
df1.head()
# Drop a column
df1.drop(columns=['mean area','mean texture'],axis=1)
# Drop a row
df1.drop(index=1,axis=0)
# Adding a column
df['Cancer Stage'] = breast_cancer.target
df.head()
# Adding a row
row = pd.Series([15,10,137],index=['mean radius','mean texture','mean perimeter'])
df.append(row,ignore_index=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12204351939451277, 'fraction_numerical': 0.017975402081362345, 'mean_word_length': 6.100671140939597, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '522583', 'license': 'MIT', 'n_tokens_mistral': 378, 'n_tokens_neox': 356, 'n_words': 104, 'path': 'Data Science/Data Preprocessing/Dataset_Manipulation_Basics.ipynb', 'repo_name': 'sandeeprawat28/Data-Science', 'size': '1057'}