Kiran P has Published 122 Articles

How to find and filter Duplicate rows in Pandas ?

Kiran P

Kiran P

Updated on 10-Nov-2020 09:38:28

7K+ Views

Sometimes during our data analysis, we need to look at the duplicate rows to understand more about our data rather than dropping them straight away.Luckily, in pandas we have few methods to play with the duplicates..duplciated()This method allows us to extract duplicate rows in a DataFrame. We will use a ... Read More

How to select a Subset Of Data Using lexicographical slicingin Python Pandas?

Kiran P

Kiran P

Updated on 10-Nov-2020 09:34:45

314 Views

IntroductionPandas have a dual selection capability to select the subset of data using the Index position or by using the Index labels. Inthis post, I will show you how to "Select a Subset Of Data Using lexicographical slicing".Google is full of datasets. Search for movies dataset in kaggle.com. This post ... Read More

How to create charts in excel using Python with openpyxl?

Kiran P

Kiran P

Updated on 10-Nov-2020 09:32:41

2K+ Views

In this post, I will show you how to create charts in excel using Python - Openpyxl module. We will create an excel spreadsheet from scratch with Tennis players grandslam titles as the data for creating bar charts using the openpyxl module.Introduction..Microsoft office has started providing a new extension to ... Read More

How to interpolate data values into strings in Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 09:19:45

239 Views

We can interpolate data values into strings using various formats. We can use this to dedug code, produce reports, forms, and other outputs. In this topic, We will see three ways of formatting strings and how to interpolate data values into strings.Python has three ways of formatting strings:% - old ... Read More

How to add command line arguments in Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 09:15:18

902 Views

Introduction..Python has a very powerful argparse module which provides functions for parsing command line arguments. If we want to get the user input from the OS command line without a lot of interaction or code a program that accepts parameters from the command line e.g. Provide a URL to parse ... Read More

How to restrict argument values using choice options in Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 09:13:26

3K+ Views

Introduction..Assume you are asked to code a program to accept the number of tennis grandslam titles from the user and process them. We already know, Federer and Nadal share the maximum grandslam titles in Tennis which is 20 (As of 2020) while the minimum is 0, lot of players are ... Read More

How to select subsets of data In SQL Query Style in Pandas?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:52:12

352 Views

IntroductionIn this post, I will show you how to perform Data Analysis with SQL style filtering with Pandas. Most of the corporate company’s data are stored in databases that require SQL to retrieve and manipulate it. For instance, there are companies like Oracle, IBM, Microsoft having their own databases with ... Read More

How to select subset of data with Index Labels in Python Pandas?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:32:47

1K+ Views

IntroductionPandas have a dual selection capability to select the subset of data using the Index position or by using the Index labels. Inthis post, I will show you how to “Select a Subset Of Data Using Index Labels” using the index label.Remember, Python dictionaries and lists are built-in data structures ... Read More

How to use one or more same positional arguments in Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:22:40

842 Views

Introduction..If we were writing a program that performs arithematic operations on two numbers, we could define them as two positional arguments. But since they are the same kinds/python data types of arguments, it might make more sense to use the nargs option to tell argparse that you want exactly two ... Read More

How to plot pie-chart with a single pie highlighted with Python Matplotlib?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:16:11

923 Views

Introduction..What is your most favorite chart type ? If you ask this question to management or a business analyst, the immediate answer is Pie charts!. It is a very common way of presenting percentages.How to do it..1. Install matplotlib by following command.pip install matplotlib2. Import matplotlibimport matplotlib.pyplot as plt3. Prepare ... Read More

Previous 1 ... 7 8 9 10 11 ... 13 Next
Advertisements