[python] map 과 apply

map 과 apply

1. map

import pandas as pd

data = {'team ' : ['russia', 'saudiarabia', 'egypt', 'uruguay']
        'against': ['saudiarabia', 'russia', 'uruguay', 'egypt'],
        'fifa_rank': [65, 63, 31, 21]}
columns = ['team', 'against', 'fifa_rank']
df = pd.DataFrame(data, columns = columns)

2. apply