Pandas and SQL Similarity 3

 

Pandas and SQL similarity
Pandas and SQL similarity

This is the 3 post in the series of Pandas and SQL command line similarity, link to first and second post are

Pandas and SQL

Pandas and SQL similarity 2

 

Finding unique values from the datasets

Pandas

We can find unique value and its count for a column with the help of below command, this may be required for in-depth data analysis.

Pandas Unique value
Pandas Unique Value
SQL

 

SQL Unique
SQL Unique/Distinct Values

Adding column to existing datasets

Sometimes we have to add new column to complete the analysis, procedure to add new column in Pandas and SQL are

Pandas –

This command will add empty column to the existing data frame with data type Object.

Pandas Add column
Pandas Add column
SQL
SQL Add column
SQL Add column

Finding Mean,SUM,Min and Max values of column

The statistical values play important role in the data analysis to develop Machine learning model, the commands to find them are

Pandas
Pandas Mean,Max Value
Pandas Mean,Max Value
SQL
SQL Mean,Max
SQL Mean,Max

Drop the column/s

We have to drop some column/s during data analysis which may be irrelevant in developing Machine learning models. The command from Pandas and SQL are

Pandas
Pandas drop column
Pandas drop column
SQL
SQL Drop column
SQL Drop column

Hope you enjoyed this 3 article to find out Pandas and SQL command line similarity, Stay tuned for the final article. You can find same article on Medium.com here.

 

 

Leave a Reply