From f07f6ff4f2eba1c6634310415e065b45beb24e06 Mon Sep 17 00:00:00 2001 From: DominikBerger01 <41689534+DominikBerger01@users.noreply.github.com> Date: Fri, 26 May 2023 11:04:09 +0200 Subject: [PATCH 1/2] fix documentation build error in basics.rst --- doc/source/user_guide/basics.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/user_guide/basics.rst b/doc/source/user_guide/basics.rst index 7335f1cb066ce..57cfb2042d8ff 100644 --- a/doc/source/user_guide/basics.rst +++ b/doc/source/user_guide/basics.rst @@ -2121,6 +2121,9 @@ different numeric dtypes will **NOT** be combined. The following example will gi .. ipython:: python + @suppress + np.random.seed(2358) + df1 = pd.DataFrame(np.random.randn(8, 1), columns=["A"], dtype="float32") df1 df1.dtypes From adcb03ecaf3e0d144243028fdcda951a9cf757dc Mon Sep 17 00:00:00 2001 From: DominikBerger01 <41689534+DominikBerger01@users.noreply.github.com> Date: Fri, 26 May 2023 19:57:35 +0200 Subject: [PATCH 2/2] remove need for seed and gen random np array from range (0,255) --- doc/source/user_guide/basics.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/source/user_guide/basics.rst b/doc/source/user_guide/basics.rst index 57cfb2042d8ff..a8afb05bc5200 100644 --- a/doc/source/user_guide/basics.rst +++ b/doc/source/user_guide/basics.rst @@ -2121,9 +2121,6 @@ different numeric dtypes will **NOT** be combined. The following example will gi .. ipython:: python - @suppress - np.random.seed(2358) - df1 = pd.DataFrame(np.random.randn(8, 1), columns=["A"], dtype="float32") df1 df1.dtypes @@ -2131,7 +2128,7 @@ different numeric dtypes will **NOT** be combined. The following example will gi { "A": pd.Series(np.random.randn(8), dtype="float16"), "B": pd.Series(np.random.randn(8)), - "C": pd.Series(np.array(np.random.randn(8), dtype="uint8")), + "C": pd.Series(np.random.randint(0, 255, size=8), dtype="uint8"), # [0,255] (range of uint8) } ) df2