Home > other >  The use of python library of pandas
The use of python library of pandas

Time:09-15

 
The import pandas as pd

Res=pd. DataFrame ()
Res/' a '=1
Res [' b ']=2
Res. To_csv (r 'test. CSV, index=0)

The above code, I expect is trying to get a test. The following are the CSV:

A, b

1
2
But the take-home test. The CSV is like this:

A, b

There is no the second row 1 2



Great god answer

CodePudding user response:

Res [' a ']=[1]
Res [' b ']=[2]
  • Related