import matplotlib.pyplot as plt
import pandas as pd
ticker = pd.read_csv(
    'https://github.com/QuantEcon/QuantEcon.lectures.code/raw/master/pandas/data/ticker_data.csv'
    )
ticker.set_index('Date', inplace=True)
ticker_list = {'INTC': 'Intel', 'MSFT': 'Microsoft', 'IBM': 'IBM', 'BHP':
    'BHP', 'TM': 'Toyota', 'AAPL': 'Apple', 'AMZN': 'Amazon', 'BA':
    'Boeing', 'QCOM': 'Qualcomm', 'KO': 'Coca-Cola', 'GOOG': 'Google',
    'SNE': 'Sony', 'PTR': 'PetroChina'}
price_change = pd.Series()
for tick in ticker_list:
    change = 100 * (ticker.loc[ticker.index[-1], tick] - ticker.loc[ticker.
        index[0], tick]) / ticker.loc[ticker.index[0], tick]
    name = ticker_list[tick]
    price_change[name] = change
price_change.sort_values(inplace=True)
fig, ax = plt.subplots(figsize=(10, 8))
price_change.plot(kind='bar', ax=ax)
plt.show()

1b7004eb0d8fc1b48832be94bbbe3768d93a47f3
<mask token>

<mask token>
ticker.set_index('Date', inplace=True)
<mask token>
for tick in ticker_list:
    change = 100 * (ticker.loc[ticker.index[-1], tick] - ticker.loc[ticker.
        index[0], tick]) / ticker.loc[ticker.index[0], tick]
    name = ticker_list[tick]
    price_change[name] = change
price_change.sort_values(inplace=True)
<mask token>
price_change.plot(kind='bar', ax=ax)
plt.show()

<mask token>
ticker = pd.read_csv(
    'https://github.com/QuantEcon/QuantEcon.lectures.code/raw/master/pandas/data/ticker_data.csv'
    )
ticker.set_index('Date', inplace=True)
ticker_list = {'INTC': 'Intel', 'MSFT': 'Microsoft', 'IBM': 'IBM', 'BHP':
    'BHP', 'TM': 'Toyota', 'AAPL': 'Apple', 'AMZN': 'Amazon', 'BA':
    'Boeing', 'QCOM': 'Qualcomm', 'KO': 'Coca-Cola', 'GOOG': 'Google',
    'SNE': 'Sony', 'PTR': 'PetroChina'}
price_change = pd.Series()
for tick in ticker_list:
    change = 100 * (ticker.loc[ticker.index[-1], tick] - ticker.loc[ticker.
        index[0], tick]) / ticker.loc[ticker.index[0], tick]
    name = ticker_list[tick]
    price_change[name] = change
price_change.sort_values(inplace=True)
fig, ax = plt.subplots(figsize=(10, 8))
price_change.plot(kind='bar', ax=ax)
plt.show()

import matplotlib.pyplot as plt
import pandas as pd
ticker = pd.read_csv(
    'https://github.com/QuantEcon/QuantEcon.lectures.code/raw/master/pandas/data/ticker_data.csv'
    )
ticker.set_index('Date', inplace=True)
ticker_list = {'INTC': 'Intel', 'MSFT': 'Microsoft', 'IBM': 'IBM', 'BHP':
    'BHP', 'TM': 'Toyota', 'AAPL': 'Apple', 'AMZN': 'Amazon', 'BA':
    'Boeing', 'QCOM': 'Qualcomm', 'KO': 'Coca-Cola', 'GOOG': 'Google',
    'SNE': 'Sony', 'PTR': 'PetroChina'}
price_change = pd.Series()
for tick in ticker_list:
    change = 100 * (ticker.loc[ticker.index[-1], tick] - ticker.loc[ticker.
        index[0], tick]) / ticker.loc[ticker.index[0], tick]
    name = ticker_list[tick]
    price_change[name] = change
price_change.sort_values(inplace=True)
fig, ax = plt.subplots(figsize=(10, 8))
price_change.plot(kind='bar', ax=ax)
plt.show()
