dataframe create
>>> df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
... columns=['a', 'b', 'c'])
>>> df2
a b c
0 1 2 3
1 4 5 6
2 7 8 9
dataframe create
>>> df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
... columns=['a', 'b', 'c'])
>>> df2
a b c
0 1 2 3
1 4 5 6
2 7 8 9
how do we create a dataframe in python
# Import pandas library
import pandas as pd
# initialize list of lists
data = [['Group A', 85], ['Group B', 92], ['Group C', 88]]
# Create the pandas DataFrame
df = pd.DataFrame(data, columns = ['Name', 'Score'])
# print dataframe.
df
pandas make new dataframe
df = pd.DataFrame({'column1':[1,2,3],'column2':[4,5,6])
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us