Kiran P has Published 118 Articles

How to perform Calculations with Dictionaries in Python?

Kiran P

Kiran P

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

2K+ Views

ProblemYou want to perform various calculations (e.g., minimum value, maximum value, sorting, etc.) on a dictionary of data.Solution.We will create a dictionary with tennis players and their grandslam titles.PlayerTitles = {    'Federer': 20,    'Nadal': 20,    'Djokovic': 17,    'Murray': 3,    'Theim' : 1,    'Zverev': 0 ... Read More

How to compare two DataFrames in Python Pandas with missing values

Kiran P

Kiran P

Updated on 09-Nov-2020 10:36:56

2K+ Views

IntroductionPandas uses the NumPy NaN (np.nan) object to represent a missing value. This Numpy NaN value has some interesting mathematical properties. For example, it is not equal to itself. However, Python None object evaluates as True when compared to itself.How to do it..Let us see some examples to understand how ... Read More

How to use the Subprocess Module in Python?

Kiran P

Kiran P

Updated on 09-Nov-2020 10:29:33

1K+ Views

Understanding Process -When you code and execute a program on Windows, MAC or Linux, your Operating System creates a process(single).It uses system resources like CPU, RAM, Disk space and also data structures in the operating system’s kernel. A process is isolated from other processes—it can’t see what other processes are ... Read More

How to process iterators in parallel using ZIP

Kiran P

Kiran P

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

398 Views

IntroductionList comprehensions make it easy to take a source list and get a derived list by applying an expression. For example, say that I want to multiply each element in a list with 5. Here, I do this by using a simple for loop.a = [1, 2, 3, 4, 5, ... Read More

How to process excel files data in chunks with Python?

Kiran P

Kiran P

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

3K+ Views

IntroductionIt seems that the world is ruled by Excel. I've been surprised in my data engineering work to see how many of my colleagues are using Excel as a critical tool for making decisions. While I'm not a big fan of MS Office and their excel spread sheets, i will ... Read More

How to Compress files with ZIPFILE module in Python.

Kiran P

Kiran P

Updated on 09-Nov-2020 10:12:31

12K+ Views

ProblemYou want to create a compress files in python.IntroductionZIP files can hold the compressed contents of many other files. Compressing a file reduces its size on disk, which is useful when transferring it over the internet or between the systems using Control-m AFT or Connect direct or even scp.Python programs ... Read More

How to append new rows to DataFrame using a Template In Python Pandas

Kiran P

Kiran P

Updated on 09-Nov-2020 10:07:27

742 Views

How to append new rows to DataFrame using a Template In Python Pandas.IntroductionBeing a data engineering specialist, i often end up creating more derived columns than rows as the role of creating and sending the data to me for analysis should be taken care of other database specialists. However, it ... Read More

How to Parse HTML pages to fetch HTML tables with Python?

Kiran P

Kiran P

Updated on 09-Nov-2020 10:04:02

881 Views

ProblemYou need to extract the HTML tables from a web page.IntroductionThe internet, and the World Wide Web (WWW), is the most prominent source of information today. There is so much information out there, it is just very hard to choose the content from so many options. Most of that information ... Read More

Advertisements