From 332e400c442d50264d102e8ae6ecbc8603ffd77b Mon Sep 17 00:00:00 2001 From: AlhusainAliAlharthi <136301285+AlhusainAliAlharthi@users.noreply.github.com> Date: Wed, 14 Jun 2023 03:46:45 +0400 Subject: [PATCH] Update understanding-word-vectors.ipynb The error you encountered is an OptionError raised by the pandas library. This error occurs when there is a problem with setting an option using the pd.set_option() function. In your case, the error message specifically states: "Pattern matched multiple keys". This means that the pattern 'max_rows' you provided matched multiple keys in the pandas options, leading to ambiguity in setting the desired option. To solve this error, you need to provide the full option name, which is 'display.max_rows', instead of just 'max_rows'. By specifying the complete option name, you ensure that the intended option is set correctly. Here's the modified line that solves the error: pd.set_option('display.max_rows', 25) By using 'display.max_rows', you explicitly set the maximum number of rows to be displayed in pandas DataFrames to 25. Remember, it's essential to check the documentation for the specific version of pandas you are using to ensure the correct option names and syntax. --- understanding-word-vectors.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/understanding-word-vectors.ipynb b/understanding-word-vectors.ipynb index b866184..a9b600c 100644 --- a/understanding-word-vectors.ipynb +++ b/understanding-word-vectors.ipynb @@ -22,6 +22,7 @@ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "pd.set_option('max_rows', 25)\n", + "#if there is any error, you can write this: \"pd.set_option('display.max_rows', 25)\"\n", "plt.style.use('ggplot')\n", "plt.rcParams[\"figure.figsize\"] = (10, 4)" ]