# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: 'Python 3.9.7 64-bit (''data_analysis'': conda)'
#     language: python
#     name: python3
# ---

# ### Slicing, Broadcasting, and Array Types

# +
# You have data for a variety of professions, and you want to increase the salaries of just the data scientists by 10 percent every other year.
# -

import numpy as np

# Data: yearly salary in $(1000) [2025, 2026, 2027]
dataScientist       = [130,132,137] 
productManager      = [127,140,145]
designer            = [118,118,127]
softwareEngineer    = [129,131,137] 

employees = np.array([dataScientist,
                      productManager,
                      designer,
                      softwareEngineer])

employees

# +
# One liner 
employees[0,::2] = employees[0,::2] * 1.1

# Result
print(employees)

StarcoderdataJupyterScriptsDedupFiltered