Skip to main content
from pandas import DataFrame
data = [['New York Yankees', 'Acevedo Juan', 900000, 'Pitcher'], 
['New York Yankees', 'Anderson Jason', 300000, 'Pitcher'], 
['New York Yankees', 'Clemens Roger', 10100000, 'Pitcher'], 
['New York Yankees', 'Contreras Jose', 5500000, 'Pitcher']]
DataFrame.from_records(data)
import pandas as pd

data = [['New York Yankees', 'Acevedo Juan', 900000, 'Pitcher'], 
        ['New York Yankees', 'Anderson Jason', 300000, 'Pitcher'], 
        ['New York Yankees', 'Clemens Roger', 10100000, 'Pitcher'], 
        ['New York Yankees', 'Contreras Jose', 5500000, 'Pitcher']]

df = pd.DataFrame.from_records(data)
from pandas import DataFrame
data = [['New York Yankees', 'Acevedo Juan', 900000, 'Pitcher'], 
['New York Yankees', 'Anderson Jason', 300000, 'Pitcher'], 
['New York Yankees', 'Clemens Roger', 10100000, 'Pitcher'], 
['New York Yankees', 'Contreras Jose', 5500000, 'Pitcher']]
DataFrame.from_records(data)
import pandas as pd

data = [['New York Yankees', 'Acevedo Juan', 900000, 'Pitcher'], 
        ['New York Yankees', 'Anderson Jason', 300000, 'Pitcher'], 
        ['New York Yankees', 'Clemens Roger', 10100000, 'Pitcher'], 
        ['New York Yankees', 'Contreras Jose', 5500000, 'Pitcher']]

df = pd.DataFrame.from_records(data)
deleted 19 characters in body
Source Link
Emre
  • 10.5k
  • 1
  • 30
  • 39
from pandas import DataFrame
data = [['New York Yankees 'Yankees', '"Acevedo Juan" 'Acevedo 'Juan', 900000, ' Pitcher']'Pitcher'], 
['New York Yankees 'Yankees', '"Anderson'Anderson Jason"'Jason', 300000, ' Pitcher']'Pitcher'], 
['New York Yankees 'Yankees', '"Clemens Roger"'Clemens 'Roger', 10100000, ' Pitcher']'Pitcher'], 
['New York Yankees 'Yankees', '"Contreras'Contreras Jose"'Jose', 5500000, ' Pitcher']]'Pitcher']]
DataFrame.from_records(data)
from pandas import DataFrame
data = [['New York Yankees ', '"Acevedo Juan"  ', 900000, ' Pitcher'], 
['New York Yankees ', '"Anderson Jason"', 300000, ' Pitcher'], 
['New York Yankees ', '"Clemens Roger" ', 10100000, ' Pitcher'], 
['New York Yankees ', '"Contreras Jose"', 5500000, ' Pitcher']]
DataFrame.from_records(data)
from pandas import DataFrame
data = [['New York Yankees', 'Acevedo Juan', 900000, 'Pitcher'], 
['New York Yankees', 'Anderson Jason', 300000, 'Pitcher'], 
['New York Yankees', 'Clemens Roger', 10100000, 'Pitcher'], 
['New York Yankees', 'Contreras Jose', 5500000, 'Pitcher']]
DataFrame.from_records(data)
Source Link
Emre
  • 10.5k
  • 1
  • 30
  • 39

from pandas import DataFrame
data = [['New York Yankees ', '"Acevedo Juan"  ', 900000, ' Pitcher'], 
['New York Yankees ', '"Anderson Jason"', 300000, ' Pitcher'], 
['New York Yankees ', '"Clemens Roger" ', 10100000, ' Pitcher'], 
['New York Yankees ', '"Contreras Jose"', 5500000, ' Pitcher']]
DataFrame.from_records(data)