2

How would you go about converting a list into a python data-frame.

For example:

listA = [1,20,12,4]

To be converted to

   listA
0  1
1  20
2  12
3  4

What is the simpliest way to achieve this?

Techno04335
  • 1,365
  • 6
  • 22
  • 43

1 Answers1

5
listA = [1,20,12,4]
pd.DataFrame(data = listA , columns=['listA'])
Nader Hisham
  • 5,214
  • 4
  • 19
  • 35