• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: make a dataframe base on a rows and columns of another dataframe

Resolved: make a dataframe base on a rows and columns of another dataframe

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

i have a a dataframe ‘a’ like this:
A header c1 c2 c3 c4 c5
c1 0 1 3 4 2
c2 2 4 3 2 4
c3 2 4 1 2 2
c4 8 4 6 5 7
c5 7 4 5 8 9

now, i want to make a dataframe based on previous dataframe with name ‘b’.
column1 column2 column3
c1 c1 0
c1 c2 1
c1 c3 3
c1 c4 4
c1 c5 2
c2 c1 2
c2 c2 4
c2 c3 3
c2 c4 2
c2 c5 4
c3 c1 2
c3 c2 4
c3 c3 1
c3 c4 2
c3 c5 2
c4 c1 8
c4 c2 4
c4 c3 6
c4 c4 5
c4 c5 7
c5 c1 7
c5 c2 4
c5 c3 5
c5 c4 8
c5 c5 9

could you help me to make this second dataframe ? thanks

Answer:

You can try this:

If you have better answer, please add a comment about this, thank you!

dataframe python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Why doesn’t stringstream consume output during hex formatting?

24/03/2023

Resolved: CMake path for python3 libraries doesn’t change (windows 10)

24/03/2023

Resolved: GLMM with quasi-Poisson distribution

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.