How to Transpose Data Frame Pandas | Python

preview_player
Показать описание
Explore how to create a data frame using Pandas, transpose the data frame, learn how to change the first row into the column header.
This is the very first part in the series of Python Pandas Brushup videos.

Stay tuned for more interesting and informative videos. These videos will help you to solve small errors faced while handling data and working with Machine Learning Project.

YouTube

Website:
Podcast (download and listen while you work, learning made easy with the release of Podcast)

Learn at your own pace enroll on Udemy:
Get Data Analysis and Visualization Courses on Udemy at a very affordable price. Designed to help clear your doubts in a more organized and structured manner.
Udemy
Offer Valid for a Month till Jan23, 20202

I invite you to join me on Quora and Instagram
Instagram

#pythondatavisualization #dataanalysis #pythontutorial
#pythonprojects #machinelearning #sourcecode #machinemantra
Рекомендации по теме
Комментарии
Автор

I LOVE YOU !!! you saved me from bulshitting over a dataframe where I spent half of my DAYYY!!

Theysay_ishi
Автор

This is so useful! I spend for like 2 hours to organise the data until i found youy clip.

kaewalincha
Автор

Looking for more, suxh short and simple videos. Thanks again!!

harshadkondalkar
Автор

This video have helped me alot, as i was stuck for while :), thanks so much

ahmedamrmandour
Автор

you are truly practical in python and pandas library thank for sharing your knowledge and I’m truly

Dawalhasa
Автор

HI Priyanka's, How do I transpose only some cells/columns instead of whole dataframe? Please help. Thanks in advance :)

HarshJani
Автор

hello mam please give the link of that video where you adressed the concern about that row names being

mdmustakim
Автор

Cristal clear explanation. I am able to transpose excel data using above example but when i am perform df.column it shoing rangeindex.
due this reason unable to rename columns as period - month, acc-accounts, sal-salary


can you pls help me on below example using excel data(column orientation)
period, jan, feb, mar
acc, 1, 2, 3
sal, 100, 200, 300

output
period, account, sal
jan, 1, 100
feb, 2, 200
mar, 3, 300

can you please help me on this

kottakaburlu
Автор

Hi, thanks for the video it helped. I noticed the after setting the year as header, the titles of the other rows changes to 0 and 1, is there a way to keep the titles?

deagee
Автор

Hi Priyanka, How do you keep the index if you transposing a large data?

jefftesamymeneus
Автор

How do u convert into heading, please?

ahe
Автор

How do you change the year column to the original using manipulation instead of with the header 0, 1, 2, etc?

wengkeong
Автор

Hii Priyanka...In my dataframe I have two column headers in one time period and in second matrics like spend, volume...I want to transpose time column into rows keeping fisrt theree column as it is which is category Manuf and Brand ...how should I do this? Please help

minakshikale
Автор

How can i describe, drop and then transpose so that I maintain the same described data? When I combine the three (transpose & describe & drop), the describe takes precedence and the transposition no longer works.

francisc.nkhata
Автор

😂 she also didn't expect the index will get reset. There is a one line solution for .T

Sunny-bjpf
Автор

Hi Priyanka,
I need some help.
Suppose I have 3 columns like location, date and values.
I have around 50 locations in location col.
I have around 10 years in date col.
I have values for each location for every year in values col.
I need to transpose the date and values as rows but location col as it is without duplicate locations

prakashgadupoodi
Автор

Student: Student Age: Average time at campus: Student Mark: Exam duration:
0 [59, 62, 36, 33, 106, 21, 114, 142, 42, 94, 10... [33, 44, 49, 27, 35, 52, 31, 21, 45, 31, 40, 5... [2, 4, 5, 4, 4, 3, 1, 3, 4, 5, 3, 3, 1, 4, 3, ... [17, 3, 0, 41, 20, 80, 33, 20, 70, 31, 43, 86, ... [135, 121, 144, 108, 93, 166, 175, 160, 160, 7.

from this sample data how do I make 5 columns and 150 rows

brownmoleli
Автор

You should buy a microphone, you sound like a robot.

haliltaylan