Skip to content

Commit

Permalink
Merge pull request #145 from QuantEcon/warnings-patch
Browse files Browse the repository at this point in the history
add in warning directive
  • Loading branch information
wupeifan authored Jun 8, 2021
2 parents 486a6ce + 8b5e6c2 commit d93e292
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lectures/pandas/reshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down Expand Up @@ -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).

Expand Down
4 changes: 3 additions & 1 deletion lectures/python_fundamentals/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

1 comment on commit d93e292

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.