Data Mining
Definition:
Data Mining is the exploration and analysis of large quantities of data in order to discover valid, novel, potentially useful and ultimately understand able patterns in data
Creating data frame : Data Frame can be created using a single list or a list of lists.
Dataframe can be created using dataframe () function. The dataframe () takes one or two parameters. The first one is the data which is to be filled in the dataframe table. The data can be in form of list of lists or dictionary of lists. In case of list of lists data, the second parameter is the columns name.
Creating a Data Frame¶
In [8]:
# Import pandas package
import pandas as pd
# Define a dictionary containing employee data
data = {'Name':['Jai', 'Princy', 'Gaurav', 'Anuj'],
'Age':[27, 24, 22, 32],
'Address':['Delhi', 'Kanpur', 'Allahabad', 'Kannauj'],
'Qualification':['MBA', 'B.TECH', 'MCA', 'M.TECH']}
# Convert the dictionary into DataFrame
df = pd.DataFrame(data)
# select two columns
print(df[['Name', 'Qualification']])
Name Qualification 0 Jai MBA 1 Princy B.TECH 2 Gaurav MCA 3 Anuj M.TECH
In [9]:
#printing Data Frame like (table based)
df
Out[9]:
Name | Age | Address | Qualification | |
---|---|---|---|---|
0 | Jai | 27 | Delhi | MBA |
1 | Princy | 24 | Kanpur | B.TECH |
2 | Gaurav | 22 | Allahabad | MCA |
3 | Anuj | 32 | Kannauj | M.TECH |
In [ ]:
Post a Comment
Thanks, for contacting us.
We will reviewing us on your comments . Please wait an hour.
Air Reality Team....