Posts

Most important MySQL Keywords and their Description.

Most used Keywords in MySQL S.No Keywords Description 1 ADD Add’s columns to the existing table. 2 ALTER Modifies columns in the table and changes the  data type of column 3 ANY Return’s True (or)False, if any subquery meets the condition 4 AS Used for aliasing 5 BETWEEN Selects values on a  given range 6 COLUMN Changes the  data type of column or delete column 7 CREATE DATABASE Creates a database 8 CREATE INDEX Creates index for all the rows including duplicate values  9 CREATE UNIQUE INDEX Creates index for all the rows excluding duplicate values  10 DISTINCT Selects different/unique values in the column 11 DROP COLUMN Deletes the column 12 DROP INDEX Deletes Index column 13 DROP TABLE Deletes table from the database 14 FOREIGN KEY Constraint used to link two tables 15 FROM  Specifies/Locates the table  16 FULL JOIN Return all the records where there is a match in either the  left (or) right table 17 GROUP BY Groups the results based on column (used with aggregate function) 18 HAVING

Pandas Basic Tutorial

Image
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’]                  “Email”: [‘Corey@gmail’, “Jane@gmail”, Jhon@gmail”]}   Keys are columns, Values are rows. There are two data types in pandas: