Python Pandas Input/Output – Pickling

If you are leaning towards a career as a Data Scientist or just a coder looking to expand your skillset, the art of pickling is a must-have. This article focuses on creating, saving, and reading various object types to/from a pickle file. Syntax pandas.read_pickle(filepath_or_buffer, compression=’infer’, storage_options=None) The return value is an unpickled object of the … Read more

Python Working with the Pandas DataFrame & MySQL – Part 2

Background Part 2 of this series centers around running more complex MySQL queries. This skill is a must-have if you are interested in pursuing a career as a Data Scientist. After completing Part 1 of this series, you should be comfortable: Installing Libraries Downloading and saving a CSV file from the web. Creating a Pandas … Read more

Python Working with the Pandas DataFrame & MySQL – Part 1

Background To provide a solid understanding of data manipulation using the Pandas DataFrame and MySQL, the Finxter Academy has created a 3-part series to take the user from beginner to advanced. This article assumes you have access to a localhost/server with MySQL. Part 2 and Part 3 also assumes you possess the login credentials with … Read more

The Pandas apply() function

In this video and blog tutorial, we will learn how to apply a function to a Pandas data frame or series using the apply() function. Using this tool, we can apply any kind of function to segregate our data and change it with a very limited amount of code. Here’s the syntax from the official … Read more

Python Pandas pivot()

Syntax pandas.pivot(data, index=None, columns=None, values=None) Return Value: The return value for the pivot() function is a reshaped DataFrame organized by index/column values. Background Direct quote from the Pandas Documentation website: This function does not support data aggregation. If there are multiple values, they will result in a Multi-Index in the columns. This article delves into … Read more

Python Pandas melt()

Syntax pandas.melt(frame, id_vars=None, value_vars=None, var_name=None, value_name=’value’, col_level=None, ignore_index=True) Return Value The return value for the melt() function is an unpivoted DataFrame. Background Direct quote from the Pandas Documentation website: “This function massages a DataFrame into a format where one or more columns are identifier variables (id_vars). While all other columns are considered measured variables (value_vars), … Read more

Reading and Writing JSON with Pandas

In this tutorial, we will learn how to transform a JSON object into a Pandas data frame and the other way around. For these approaches, we will have a look at the Pandas functions read_json() and to_json(). Working with JSON objects in Pandas is a very essential skill because we often find data stored in … Read more

Python Excel – Basic Worksheet Operations

Part 4 in the Working with Excel series focuses on Worksheet(s) manipulation.   Background After completing Part 3 of this series, you should be comfortable using Python and openpyxl to: append row(s), modify data, insert column(s), delete row(s) and column(s) The j-greats.xlsx file should exist on your system. If you do not have this particular … Read more

Python Excel – Manipulating Worksheet Data

Building on the skill(s) you learned earlier, Part 3 centers around manipulating the data. This skill is another must-have if you are interested in pursuing a career as a Data Scientist. Background After completing Part 2 of this series, you should be comfortable using Python to: access a single row/column value, access a range of … Read more