Skip to content
Advertisement

Give column name when read csv file pandas

This is the example of my dataset.

JavaScript

How to push down the first column and add the names column [TIME, X, Y, and Z] on the first column.

The desired output is like this:

JavaScript

Advertisement

Answer

I’d do it like this:

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