-2

Image is about how dictionary data print like csv data in python

enter image description here

Mohideen bin Mohammed
  • 18,813
  • 10
  • 112
  • 118
Alkesh Mahajan
  • 469
  • 6
  • 17
  • 2
    Welcome to StackOverflow. Please take the time to read this post on [how to provide a great pandas example](http://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) as well as how to provide a [minimal, complete, and verifiable example](http://stackoverflow.com/help/mcve) and revise your question accordingly. These tips on [how to ask a good question](http://stackoverflow.com/help/how-to-ask) may also be useful. – jezrael Aug 28 '17 at 12:58
  • 4
    [Don't post images of code (or links to them)](http://meta.stackoverflow.com/questions/285551/why-may-i-not-upload-images-of-code-on-so-when-asking-a-question) – jezrael Aug 28 '17 at 12:58
  • what is your question? – Mohideen bin Mohammed Aug 28 '17 at 12:59
  • Sir, i want table in the vertical format but i am getting in the horizontal format. – Alkesh Mahajan Aug 28 '17 at 13:03
  • `df = df.T`........ – cs95 Aug 28 '17 at 13:37
  • 1. We need to see your Data 2. We need to see the code producing this data 3. BOTH NEED TO BE IN TEXT. – cs95 Aug 28 '17 at 13:41
  • Values and keys of your dictionary please. – Bharath M Shetty Aug 28 '17 at 14:03
  • 1
    Finally I Got Solution ,Prob because of index=[0]...-----> df = pd.DataFrame(doc, columns = [ "c_nm","sector","nm12", "nm13", "nm14","nm15", "nm16", "nm17","re12", "re13", "re14","re15", "re16", "re17","rw12", "rw13", "rw14","rw15", "rw16", "rw17","om12", "om13", "om14","om15", "om16", "om17","rg12", "rg13", "rg14","rg15", "rg16", "rg17","np12", "np13", "np14","np15", "np16", "np17"],index=[0]) print(df) – Alkesh Mahajan Aug 28 '17 at 18:52

1 Answers1

0

Finally I Got Solution ,Prob because of index=[0]...-----> df = pd.DataFrame(doc, columns = [ "c_nm","sector","nm12", "nm13", "nm14","nm15", "nm16", "nm17","re12", "re13", "re14","re15", "re16", "re17","rw12", "rw13", "rw14","rw15", "rw16", "rw17","om12", "om13", "om14","om15", "om16", "om17","rg12", "rg13", "rg14","rg15", "rg16", "rg17","np12", "np13", "np14","np15", "np16", "np17"],index=[0]) print(df)

Alkesh Mahajan
  • 469
  • 6
  • 17