#!/usr/bin/python3
# --*-- coding:utf-8 --*--
# @Author    : YuAn
# @Site      : 
# @File      : 01_Pandas_Module.py
# @Time      : 2018/6/5 16:11
# @software  : PyCharm


import pandas as pd

data = {'col1': [1, 2], 'col2': [3, 4], 'col3': [4, 2]}

dataframe = pd.DataFrame(data=data)

print("DATAFRAME \n", dataframe)

print("\nOnly COLUMN1, 3 data\n", dataframe[['col1', 'col3']])

dataframe['col4'] = dataframe['col1'] * dataframe['col2']
print(dataframe
)
d29b005c1fdc4759e720568efdc13bf67a0585c4
<mask token>

<mask token>
print('DATAFRAME \n', dataframe)
print("""
Only COLUMN1, 3 data
""", dataframe[['col1', 'col3']])
<mask token>
print(dataframe)

<mask token>
data = {'col1': [1, 2], 'col2': [3, 4], 'col3': [4, 2]}
dataframe = pd.DataFrame(data=data)
print('DATAFRAME \n', dataframe)
print("""
Only COLUMN1, 3 data
""", dataframe[['col1', 'col3']])
dataframe['col4'] = dataframe['col1'] * dataframe['col2']
print(dataframe)

import pandas as pd
data = {'col1': [1, 2], 'col2': [3, 4], 'col3': [4, 2]}
dataframe = pd.DataFrame(data=data)
print('DATAFRAME \n', dataframe)
print("""
Only COLUMN1, 3 data
""", dataframe[['col1', 'col3']])
dataframe['col4'] = dataframe['col1'] * dataframe['col2']
print(dataframe)

#!/usr/bin/python3
# --*-- coding:utf-8 --*--
# @Author    : YuAn
# @Site      : 
# @File      : 01_Pandas_Module.py
# @Time      : 2018/6/5 16:11
# @software  : PyCharm


import pandas as pd

data = {'col1': [1, 2], 'col2': [3, 4], 'col3': [4, 2]}

dataframe = pd.DataFrame(data=data)

print("DATAFRAME \n", dataframe)

print("\nOnly COLUMN1, 3 data\n", dataframe[['col1', 'col3']])

dataframe['col4'] = dataframe['col1'] * dataframe['col2']
print(dataframe
)