<jupyter_start><jupyter_text>The Axes of the Panel<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p.items
p.major_axis
p.minor_axis
p.axes<jupyter_output><empty_output><jupyter_text>Panel Attributes<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p.axes
p.items
p.major_axis
p.minor_axis
p.ndim
p.dtypes
p.shape
p.size
5 * 1688 * 5<jupyter_output><empty_output><jupyter_text>Extracting `DataFrames` from a `Panel` Using Bracket Notation<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p.items
p["Volume"]<jupyter_output><empty_output><jupyter_text>Extracting with the `.loc[]`, `.iloc[]`, and `.ix[]` Methods<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p.items
p.loc["Low", "2014-04-08", "GOOG"]
p.iloc[3, 200, 3]
p.ix["High", 500, 4]<jupyter_output><empty_output><jupyter_text>Convert `Panel` to a `MultiIndex DataFrame` (and Vice Versa)<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
df = p.to_frame()
df.head()
p2 = df.to_panel()
p2<jupyter_output><empty_output><jupyter_text>The `.major_xs()` Method<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p.items
p["Volume"]
p.major_axis
p.major_xs("2013-12-20")<jupyter_output><empty_output><jupyter_text>The `.minor_xs()` Method<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p.minor_axis
p.minor_xs("MSFT")
p.minor_xs("GOOG").head(3)
p
p.items
p.major_axis
p.minor_axis
p["Open"]
p.major_xs("2016-09-16")
p.minor_xs("YHOO")<jupyter_output><empty_output><jupyter_text>Transpose a `Panel` with the `.transpose()` Method<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p.axes
p2 = p.transpose(2, 1, 0)
p
p2["GOOG"]
p2.major_xs("2010-01-04")
p2.minor_xs("Volume")<jupyter_output><empty_output><jupyter_text>The `.swapaxes()` Method<jupyter_code>companies = ["MSFT", "GOOG", "AAPL", "YHOO", "AMZN"]

p = data.DataReader(name = companies, data_source = "google", start = "2010-01-01", end = "2016-12-31")

p
p2 = p.swapaxes("items", "minor")
p2.axes
p2["MSFT"]
p2.major_xs("2016-09-02")
p2.minor_xs("Close")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.205607476635514, 'fraction_numerical': 0.07142857142857142, 'mean_word_length': 6.169856459330144, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '183403', 'license': 'MIT', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1319, 'n_words': 238, 'path': 'CompletedCourseFiles/Panels.ipynb', 'repo_name': 'kartikeyporwal/pandas-learning-course', 'size': '2996'}