In this post, we will see examples of saving a Pandas dataframe as Excel file. Pandas has to_excel() function to write a dataframe into Excel file. Let us load Pandas. We will create two lists and us these to create a dataframe as before. We can create a Pandas dataframe using the two lists to […]
How to Save Pandas Dataframe as gzip/zip File?
In this post, we will learn one of the most useful things you might do in doing data analysis. Here we will learn how to save the dataframe as a compressed file like gzip or zip file. Saving a file in compressed form can be of help when space is an issue. Let us load […]
How To Drop Multiple Columns in Pandas Dataframe?
Sometimes while working a Pandas dataframe, you might like to subset the dataframe by keeping or drooping other columns. In this post, we will see examples of dropping multiple columns from a Pandas dataframe. We can drop columns in a few ways. We will use Pandas drop() function to learn to drop multiple columns and […]
How to Get Column Names as List in Pandas?
In this post we will see how to get the column names of a Pandas dataframe as a list. One of the common tasks in data analysis is to use the names of columns frequently for a number of reasons. We will first see how to extract the names of columns from a dataframe. We […]
3 Ways to Select One or More Columns with Pandas
Subsetting a data frame by selecting one or more columns from a Pandas dataframe is one of the most common tasks in doing data analysis. With Pandas, we can use multiple ways to select or subset one or more columns from a dataframe. In this post, we will see 3 ways to select one or […]