LoslegenKostenlos loslegen

Accessing using indexes

In this exercise, you will select and set stock positions using the numerical indexes of the rows and columns in a DataFrame. The provided DataFrame has this data:

Symbol Purchased Quantity Price
0 AAPL 2016-01-08 23 96.96
1 AAPL 2018-09-07 50 221.30
2 AMZN 2020-02-14 14 324.95

Diese Übung ist Teil des Kurses

Intermediate Python for Finance

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Cell first row, Price column
print(positions.iloc[____, ____])

# Cell last row, Symbol column
print(positions.____[____, ____])
Code bearbeiten und ausführen