Pandas Basic Tutorial
DEMO Note: This was made by the Stackoverflow Developer Dataset . *import pandas as pd df = read_csv(“file path”) # reads the CSV file df #prints the entire data frame. df.shape #gives the shape of the data frame (rows, columns) df.info #gives the complete info about the data frame pd.set_option(“display.max_columns”, number of columns) # displays all the columns. pd.set_option(“display.max_rows”, number of columns) # displays all the columns. schema_df = pd.read_csv(‘file path_schema.csv”) #gives what the each column mean df.head() #displays first 5 rows by default df.head(10) # displays first 10 rows df.tail() # displays last 5 rows df.tail(10) #displays last 10 rows DATAFRAME AND SERIES We can create a data frame with the help of dictionaries. people = {“First”:[‘Corey’, ‘jane’, ‘Jhon’] “Last”:[‘Schafer’, ‘Doe’, ‘Doe’] ...