Skip to content
Advertisement

How can i write excel columns into one column in text file?

I have an excel sheet and have huge data in many columns and I need to print those columns to follow each other in one column in a text file .. I searched a lot for a tool to do this but couldn’t find and tried to take it manually but I’m stuck in the data. Can this be done by python?

i have data like this in excel

JavaScript

and need to write them in text file like this

JavaScript

Advertisement

Answer

First run this command in terminal

JavaScript

Then run this in python

JavaScript

To remove empty Nan values from seies, use dropna

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement