
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
372 Views
To find the summary of statistics of a DataFrame, use the describe() method. At first, we have imported the following pandas library with an aliasimport pandas as pdFollowing is our CSV file and we are creating a Pandas DataFrame −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv")Now, get the summary of statistics of our Pandas ... Read More

AmitDiwan
653 Views
To count the rows and columns in a DataFrame, use the shape property. At first, let’s say we have the a CSV file on the Desktop as shown in the below path −C:\Users\amit_\Desktop\CarRecords.csvRead the CSV file −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\CarRecords.csv") Let us now count the rows and columns using shapedataFrame.shapeExampleFollowing is ... Read More

AmitDiwan
4K+ Views
To display specific number of rows from a DataFrame, use the head() function. Set the parameter to be the number of row records to be fetched. For example, for 10 rows, mention −dataFrame.head(10)At first, let us import the required library with an alias −import pandas as pd Our CSV is ... Read More

AmitDiwan
224 Views
To iterate and fetch the rows containing the desired text, use the itertuples() and find() method. The itertuples() iterate over DataFrame rows.At first, let us import the required library with an alias −import pandas as pdOur CSV is on the Desktop as shown in the below path −C:\Users\amit_\Desktop\CarRecords.csv Let us ... Read More

AmitDiwan
11K+ Views
To merge all excel files in a folder, use the Glob module and the append() method.Let’s say the following are our excel files on the Desktop −Sales1.xlsxSales2.xlsxNote − You may need to install openpyxl and xlrd packages.At first, set the path where all the excel files you want to merge ... Read More

AmitDiwan
6K+ Views
To sort CSV by a single column, use the sort_values() method. Set the column using which you want to sort in the sort_values() method.At first, let’s read our CSV file “SalesRecords.csv”with DataFrame −dataFrame = pd.read_csv("C:\Users\amit_\Desktop\SalesRecords.csv")Sort according to a single column “Car” −dataFrame.sort_values("Car", axis=0, ascending=True, inplace=True, na_position='first')Next, sort according to a ... Read More

AmitDiwan
6K+ Views
To read all excel files in a folder, use the Glob module and the read_csv() method. Let’s say the following are our excel files in a directory −At first, let us set the path and get the csv files. Our CSV files are in the folder MyProject −path = "C:\Users\amit_\Desktop\MyProject\"Read ... Read More

AmitDiwan
242 Views
Swarm Plot in Seaborn is used to draw a categorical scatterplot with non-overlapping points. The seaborn.swarmplot() is used for this. Draw swarms of observations on top of a box plot using the seaborn.boxplot().Let’s say the following is our dataset in the form of a CSV file −Cricketers2.csvAt first, import the ... Read More

AmitDiwan
649 Views
Swarm Plot in Seaborn is used to draw a categorical scatterplot with non-overlapping points. The seaborn.swarmplot() is used for this. Control swarm order by passing an explicit order i.e. ordering on the basis of a specific column using the order parameter −Let’s say the following is our dataset in the ... Read More

AmitDiwan
433 Views
Swarm Plot in Seaborn is used to draw a categorical scatterplot with non-overlapping points. The seaborn.swarmplot() is used for this. To group the swarms by two categorical variables, set those variables in the swarmplot() using the x, y or hue parameters.Let’s say the following is our dataset in the form ... Read More