From 932d0f3855e7158ed05f34281d40dc02b06122ad Mon Sep 17 00:00:00 2001 From: Amedeus Akira Dsouza <59585791+aadsouza@users.noreply.github.com> Date: Mon, 7 Jun 2021 20:48:36 -0700 Subject: [PATCH 1/2] warning directive --- lectures/pandas/reshape.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lectures/pandas/reshape.md b/lectures/pandas/reshape.md index 10dc35c4..fd68c04b 100644 --- a/lectures/pandas/reshape.md +++ b/lectures/pandas/reshape.md @@ -342,8 +342,10 @@ It can be used to move all of the "values" stored in your DataFrame to a single column with all other columns being used to contain identifying information. -**Warning**: When you use `melt`, any index that you currently have +```{warning} +When you use `melt`, any index that you currently have will be deleted. +``` We saw used `melt` above when we constructed `bball_long`: @@ -591,8 +593,9 @@ df_melted ### Exercise 1 -(*Warning*: This one is challenging): - +```{warning} +This one is challenging +``` Recall the `bball_wide` DataFrame from above (repeated below to jog your memory). From 8b5e6c21c04dfc55dd3cfe5841a2a0cdc520e860 Mon Sep 17 00:00:00 2001 From: Amedeus Akira Dsouza <59585791+aadsouza@users.noreply.github.com> Date: Mon, 7 Jun 2021 20:52:38 -0700 Subject: [PATCH 2/2] another warning directive --- lectures/python_fundamentals/basics.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lectures/python_fundamentals/basics.md b/lectures/python_fundamentals/basics.md index 5db54a83..02a561a0 100644 --- a/lectures/python_fundamentals/basics.md +++ b/lectures/python_fundamentals/basics.md @@ -395,8 +395,10 @@ print("a ^ b is", a^b) You likely could have guessed all except the last two. -**Warning**: Python uses `**`, not `^`, for exponentiation (raising a number +```{warning} +Python uses `**`, not `^`, for exponentiation (raising a number to a power)! +``` Notice also that above `+`, `-` and `**` all returned an integer type, but `/` converted the result to a float.