Creata Daframe Python
d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
df
Awful Alpaca
d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
df
import numpy as np
import pandas as pd
vect1=np.zeros(10)
vect2=np.ones(10)
df=pd.DataFrame({'col1':vect1,'col2':vect2})
import pandas as pd
data = {'First Column Name': ['First value', 'Second value',...],
'Second Column Name': ['First value', 'Second value',...],
....
}
df = pd.DataFrame (data, columns = ['First Column Name','Second Column Name',...])