Please begging you to help me I have a data-frame that I am trying to transpose, My original data-frame looks like this in excel I was able to partially transpose the data and index the Locations, which I would like to be my first column and not the index. df_transposed = df.T df_transposed df_transposed.reset_index(drop = True, inplace = True) I would like to have the Location, Assessment, Subject, Grade, Percent Met, Total Met as columns in the dataframe.
Please begging you to help me I have a data-frame that I am trying to transpose, My original data-frame looks like this in excel I was able to partially transpose the data and index the Locations, which I would like to be my first column and not the index. df_transposed = df.T df_transposed df_transposed.reset_index(drop = True, inplace = True) I would like to have the Location, Assessment, Subject, Grade, Percent Met, Total Met as columns in the dataframe.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please begging you to help me
I have a data-frame that I am trying to transpose, My original data-frame looks like this in excel
I was able to partially transpose the data and index the Locations, which I would like to be my first column and not the index.
df_transposed = df.T
df_transposed
df_transposed.reset_index(drop = True, inplace = True)
I would like to have the Location, Assessment, Subject, Grade, Percent Met, Total Met as columns in the dataframe.
![Assessment
3
M-STEP
4
M-STEP
5
M-STEP
6
M-STEP
7
M-STEP
8
M-STEP
9
M-STEP
10 M-STEP
11
M-STEP
12 M-STEP
M.STED
df_transposed= df.T
Show Transcribed Text
df transposed
Subject
English
English
English
English
English
English
0
Mathematics
Mathematics
Mathematics
Mathematics
1
Mathematice
Location Assessment
Grade
Grade 3
Grade 4
Grade 5
Grade 6
Grade 7
2 0 Grade
Grade 8
Grade 3
Grade 4
Grade 5
Grade 6
Gmde 7
Muskegon
5 Area ISD Total Met
(61)
Total Met
3
0 1 2 3 4 5 6 7
Ć
M-M- M- M M. M
STEP STEP STEP STEP STEP STEP
Grade Grade Grade Grade Grade Grade
3 4 5 6 7 8
3
Statewide Total Met 3666 3803 3978 3379 3544 3676
3666
3803
3978
3379
4
Statewide Percent Met 19.2% 20.2% 20.7% 17.7 % 19.2% 20.1%
3544
3676
3688
2858
1808
1856
1950
I was able to partially transpose the data and
index the Locations, which I would like to be
my first column and not the index.
df_transposed = df.T
df_transposed
8
Percent Met
M-STEP M-STEP
Grade 3 Grade 4
19.3%
19.20%
20.20%
20.70%
17.70%
3688 2858
19.20%
20.10%
15.2%
19.30%
15,20%
9.40%
9.70%
10 100%
9 178 179 180
↑ VO
H
Total Met
0 Subject English English English English English English Mathematics Mathematics Writing Writing Writing W
THE
H
THE
43
48
53
<10 <10 <10
41
63
43 48 53 41 63 47 63 49 <10 <10 <10
47
63
49
24
20
21
WIDA WIDA WIDA 1
Grade Grade Grade (
6 7 8](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F548e0d29-afa6-4209-830b-eb254a3be1a0%2F4a3e2c44-f96b-452d-ac44-4a6edf4ea8b0%2Fzp6gi8h_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Assessment
3
M-STEP
4
M-STEP
5
M-STEP
6
M-STEP
7
M-STEP
8
M-STEP
9
M-STEP
10 M-STEP
11
M-STEP
12 M-STEP
M.STED
df_transposed= df.T
Show Transcribed Text
df transposed
Subject
English
English
English
English
English
English
0
Mathematics
Mathematics
Mathematics
Mathematics
1
Mathematice
Location Assessment
Grade
Grade 3
Grade 4
Grade 5
Grade 6
Grade 7
2 0 Grade
Grade 8
Grade 3
Grade 4
Grade 5
Grade 6
Gmde 7
Muskegon
5 Area ISD Total Met
(61)
Total Met
3
0 1 2 3 4 5 6 7
Ć
M-M- M- M M. M
STEP STEP STEP STEP STEP STEP
Grade Grade Grade Grade Grade Grade
3 4 5 6 7 8
3
Statewide Total Met 3666 3803 3978 3379 3544 3676
3666
3803
3978
3379
4
Statewide Percent Met 19.2% 20.2% 20.7% 17.7 % 19.2% 20.1%
3544
3676
3688
2858
1808
1856
1950
I was able to partially transpose the data and
index the Locations, which I would like to be
my first column and not the index.
df_transposed = df.T
df_transposed
8
Percent Met
M-STEP M-STEP
Grade 3 Grade 4
19.3%
19.20%
20.20%
20.70%
17.70%
3688 2858
19.20%
20.10%
15.2%
19.30%
15,20%
9.40%
9.70%
10 100%
9 178 179 180
↑ VO
H
Total Met
0 Subject English English English English English English Mathematics Mathematics Writing Writing Writing W
THE
H
THE
43
48
53
<10 <10 <10
41
63
43 48 53 41 63 47 63 49 <10 <10 <10
47
63
49
24
20
21
WIDA WIDA WIDA 1
Grade Grade Grade (
6 7 8
![24] df_transposed.reset_index (drop = True, inplace
df_transposed.head
> <bound method NDFrame.head of
0
ܘ ܝ ܚ ܚ ܗ ܗ
3
a SAWNHO
1
2
3
4
5
6
index
Location
0
0
Statewide
Statewide
Muskegon Area ISD (61)
Muskegon Area ISD (61)
=
True)
0
M-STEP
Assessment M-STEP
Subject English English
Grade 4
Grade
Total Met
Percent Met
Grade 3
3666
19.2%
43
10.8%
Total Met
Percent Met
3803
20.2%
48
14.0%
1
2
3 \](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F548e0d29-afa6-4209-830b-eb254a3be1a0%2F4a3e2c44-f96b-452d-ac44-4a6edf4ea8b0%2F1m69icn_processed.png&w=3840&q=75)
Transcribed Image Text:24] df_transposed.reset_index (drop = True, inplace
df_transposed.head
> <bound method NDFrame.head of
0
ܘ ܝ ܚ ܚ ܗ ܗ
3
a SAWNHO
1
2
3
4
5
6
index
Location
0
0
Statewide
Statewide
Muskegon Area ISD (61)
Muskegon Area ISD (61)
=
True)
0
M-STEP
Assessment M-STEP
Subject English English
Grade 4
Grade
Total Met
Percent Met
Grade 3
3666
19.2%
43
10.8%
Total Met
Percent Met
3803
20.2%
48
14.0%
1
2
3 \
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education