Try to search your question here, if you can't find : Ask Any Question Now ?

how to convert pandas data frame from multiple columns to single column for recommandation system

HomeCategory: stackoverflowhow to convert pandas data frame from multiple columns to single column for recommandation system
gaurav asked 1 week ago

I have a dataframe as below

df1:-

id  recharg1 recharg2 recharg3

01     1       4        2                
02     4       2        2                

now I need to change dataframe as below

df2:-

 id     previous recharg
 01       1
 01       4
 01       2
 02       4
 02       2
 02       2

please help me to solve this as I am new to python struck with this.

1 Answers
Best Answer
naveen answered 1 week ago
Your Answer

18 + 2 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com