pydata-book
pydata-book copied to clipboard
Materials and IPython notebooks for "Python for Data Analysis" by Wes McKinney, published by O'Reilly Media
The code is wrong. ``` from IPython.core.debugger import Pdb def set_trace(): Pdb(.set_trace(sys._getframe().f_back) def debug(f, *args, **kwargs): pdb = Pdb() return pdb.runcall(f, *args, **kwargs) ``` It should be ``` from IPython.core.debugger...
The sentence "where 1 would mean the bucket [0, 100)" is wrong. It shoule be "where 1 would mean the bucket (0, 100]" Because `bins.searchsorted(np.array([100]))` return 1
There is no differences between Out[167] and Out[169]. Though I know the means, others maybe misunderstand this. So I recommend to change the In[168] to: `arr[:, 1].sort()`
Between In[114] and In[116] Should we add the In[115]? `In[115]: names = names.reset_index(drop=True)`
The trick can not work: ``` def demean_axis(arr, axis): means = arr.mean(axis) indexer = [slice(None)] * arr.ndim indexer[axis] = np.newaxis return arr - means[indexer] ``` Here is the way to...
In Chapter 4, numpy, above in Table 4.6, axis=0 should be calculating the cumulative sum of the column, and axis=1 is the cumulative sum of the row.
The online free ebook is quite useful. However, unlike the structures of the online ones, the jupyter notebooks of this repository lacks enough Markdown cells ——using something as follows(just the...
Code cell 68 in Chapter 4 was mistakenly generating 1000 data points instead of 100. So, I Adjusted the step size to generate 100 data points correctly.
(Perhaps) all the tables on the websites have IDs with prefix of "tbl-", but the links pointing to them do not have that, causing the links invalid. For instance, in...