Giter Club home page Giter Club logo

quantecon-notebooks-datascience's People

Contributors

arnavs avatar cc7768 avatar wupeifan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quantecon-notebooks-datascience's Issues

qeds in Colab: RecursionError: maximum recursion depth exceeded in comparison

After installation with recommend ! pip install qeds in Google Colab (Python3), I get some strange recursion errors, always variation on the same theme:

import qeds
qeds.themes.mpl_style();

---------------------------------------------------------------------------
RecursionError                            Traceback (most recent call last)
<ipython-input-16-72b73e412c56> in <module>()
      5 # activate plot theme
      6 import qeds
----> 7 qeds.themes.mpl_style();

1 frames
/usr/local/lib/python3.6/dist-packages/qeds/themes.py in mpl_style()
     49     rcp['axes.labelsize'] = 'large'
     50 
---> 51     plt.style.library["qeds"] = mpl_style()
     52     plt.style.reload_library()
     53     plt.style.use("qeds")

... last 1 frames repeated, from the frame below ...

/usr/local/lib/python3.6/dist-packages/qeds/themes.py in mpl_style()
     49     rcp['axes.labelsize'] = 'large'
     50 
---> 51     plt.style.library["qeds"] = mpl_style()
     52     plt.style.reload_library()
     53     plt.style.use("qeds")

RecursionError: maximum recursion depth exceeded in comparison


Potential Inaccuracy in `quantecon-notebooks-datascience/python_fundamentals/control_flow.ipynb`

Lines 179-181 in the source blob of quantecon-notebooks-datascience/python_fundamentals/control_flow.ipynb read:

"Note that we can also consider an asset that lives and pays forever if\n",
"$ T= \infty $, and from (2), the value of an asset which\n",
"pays 1 forever is $ \frac{r}{1+r} $."

when in fact the infinite series associated with an asset that pays 1 forever converges to $ \frac{1+r}{r} > 1$, assuming $ r \geq 0 $.

Am I missing something? If not, I kindly request that someone fix this issue.

pct_change()

pandas/basics.ipynb applies pct_change() without arguments.

Is it better to mention the behavior of pct_change() in case there are missing values? The default behavior is padding if there is any missing data. Need to use pct_change(fill_method=None) if anyone wants the percentage to be missing.

Below is an example:

import pandas as pd
import numpy as np

df = pd.DataFrame({'x': [1, 2, np.nan, 3, 4]})

df

output:
    x
0  1.0
1  2.0
2  NaN
3  3.0
4  4.0


df.pct_change()

output:
          x
0       NaN
1  1.000000
2  0.000000
3  0.500000
4  0.333333

df.pct_change(fill_method=None)

output:
          x
0       NaN
1  1.000000
2       NaN
3       NaN
4  0.333333

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.