You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/numpy.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -709,7 +709,7 @@ row, column = a.shape
709
709
result = np.empty((3, 3))
710
710
for i in range(row):
711
711
for j in range(column):
712
-
result[i, j] = a[i, j] + b[i]
712
+
result[i, j] = a[i, j] + b[i,0]
713
713
714
714
result
715
715
```
@@ -1474,6 +1474,17 @@ print(A)
1474
1474
1475
1475
**Part2**: Move on to replicate the result of the following broadcasting operation. Meanwhile, compare the speeds of broadcasting and the `for` loop you implement.
1476
1476
1477
+
For this part of the exercise you can use the `tic`/`toc` functions from the `quantecon` library to time the execution.
Copy file name to clipboardExpand all lines: lectures/pandas.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -506,12 +506,7 @@ An important database for economists is [FRED](https://research.stlouisfed.org/f
506
506
507
507
For example, suppose that we are interested in the [unemployment rate](https://research.stlouisfed.org/fred2/series/UNRATE).
508
508
509
-
Via FRED, the entire series for the US civilian unemployment rate can be downloaded directly by entering
510
-
this URL into your browser (note that this requires an internet connection)
511
-
512
-
(To download the data as a csv, click here: [https://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv](https://fred.stlouisfed.org/graph/fredgraph.csv?bgcolor=%23e1e9f0&chart_type=line&drp=0&fo=open%20sans&graph_bgcolor=%23ffffff&height=450&mode=fred&recession_bars=on&txtcolor=%23444444&ts=12&tts=12&width=1320&nt=0&thu=0&trc=0&show_legend=yes&show_axis_titles=yes&show_tooltip=yes&id=UNRATE&scale=left&cosd=1948-01-01&coed=2024-10-01&line_color=%234572a7&link_values=false&line_style=solid&mark_type=none&mw=3&lw=3&ost=-99999&oet=99999&mma=0&fml=a&fq=Monthly&fam=avg&fgst=lin&fgsnd=2020-02-01&line_index=1&transformation=lin&vintage_date=2024-11-03&revision_date=2024-11-03&nd=1948-01-01))
513
-
514
-
This request returns a CSV file, which will be handled by your default application for this class of files.
509
+
(To download the data as a csv, click on the top right `Download` and select the `CSV (data)` option).
515
510
516
511
Alternatively, we can access the CSV file from within a Python program.
0 commit comments