In these articles, we will discuss how to read data from excel and perform some mathematical operation and store it into a new column in DataFrame. Suppose our excel file looks like this.
Then we have to compute the sum of two-column and find out the maximum value and store into a new DataFrame column.
- Import Pandas module.
- Read data from Excel.
- Create a new column for storing Sum and maximum.
- Set the Index of each column for accessing the element.
- Store the sum of two-columns in a new column.
- And store Maximum number from two columns in a column.
- Display DataFrame.
Step 1: Importing module and reading from excel.
Step 2: Create a new column for storing sum and max
Step 3: Set an index for accessing the required column.
2 3 4 5
Step 4: Select each row and add a column and find maximum
- How to extract Email column from Excel file and find out the type of mail using Pandas?
- How to import excel file and find a specific column using Pandas?
- How to extract Time data from an Excel file column using Pandas?
- Create a GUI to convert CSV file into excel file using Python
- How to import an excel file into Python using Pandas?
- How to extract date from Excel file using Pandas?
- Exporting a Pandas DataFrame to an Excel file
- Create a Pandas DataFrame from a Numpy array and specify the index column and column headers
- Python | Plotting column charts in excel sheet using XlsxWriter module
- Python | Plotting an Excel chart with pattern fills in column using XlsxWriter module
- Python | Plotting column charts in excel sheet with data tables using XlsxWriter module
- Find the profit and loss in the given Excel sheet using Pandas
- Find the profit and loss percent in the given Excel sheet using Pandas
- Python | Adjusting rows and columns of an excel file using openpyxl module
- Python | Create and write on excel file using xlsxwriter module
- Get column index from column name of a given Pandas DataFrame
- Python | Test if number is valid Excel column
- Python | Writing to an excel file using openpyxl module
- Python | Arithmetic operations in excel file using openpyxl
- Python | Trigonometric operations in excel file using openpyxl
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.