0

This is the head of my dataframe

I am trying to understand how I can certain column of NFLX, and generally how the data frame is actually constructed. Are NFLX, AAPL, GOOG, etc. groupings, or are they labels for certain columns/rows?

Thank you in advance for any help you can provide me.

This is a pandas data frame, using following code to create: data = yf.download(['MSFT', 'AAPL', 'AMZN', 'GOOG', 'NFLX', 'ACLS', 'TSLA'], start=start, end=end, group_by ='ticker')

Tom Donsbach
  • 101
  • 1
  • 1
    You have a multindex dataframe. Refer to his: https://pandas.pydata.org/docs/user_guide/advanced.html – Gedas Miksenas Sep 22 '22 at 05:45
  • The acquired data frame consists of multiple columns. Try the following to understand the structure. `data.columns` OUTPUT: `MultiIndex([('ACLS', 'Open'), ('ACLS', 'High'), ('ACLS', 'Low'), ...` – r-beginners Sep 22 '22 at 06:20
  • Does this answer your question? [Selecting columns from pandas MultiIndex](https://stackoverflow.com/questions/18470323/selecting-columns-from-pandas-multiindex) – Laurent Sep 24 '22 at 14:23

0 Answers0