Daily Python Tip

@python_tip

One tip per day. Do you have any? Send it to . Edited by , , and... you?

Vrijeme pridruživanja: veljača 2017.

Tweetovi

Blokirali ste korisnika/cu @python_tip

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @python_tip

  1. prije 11 sati

    Working with ? Explore the fractions module: >>> from fractions import Fraction as frac >>> print(frac(3, 10)) 3/10 >>> print(frac(0.33).limit_denominator(100)) 33/100 >>> print(frac('1/4') + frac(1, 5)) 9/20

    Poništi
  2. 20. pro

    Get information about the underlying system with the platform module: >>> import platform >>> platform.architecture() ('64bit', '') >>> platform.machine() 'x86_64' >>> platform.system() 'Linux'

    Poništi
  3. 19. pro
    Poništi
  4. 17. pro

    >>> "a"*10 'aaaaaaaaaa' >>> ["a"]*10 ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a']

    Poništi
  5. 16. pro

    Do you need some hints for using ? Dovpanda is your friend.

    Poništi
  6. 15. pro

    The Python visualization world can be sometimes a frustrating place. It helps if you understand basic building blocks - see "Effectively Using " tutorial

    Poništi
  7. 12. pro

    Sometimes it is handy to get R functionality in Python (through ) or Python functionality in R (through ). But starting to think in a new language can be painful. G. V. Wilson wrote The Tidynomicon, an introduction to R for Python coders.

    Poništi
  8. 11. pro

    Also, thanks for a correction of a mistake in the first version of this tweet.

    Prikaži ovu nit
    Poništi
  9. 11. pro

    x += a is not always the same as x = x + a >>> x = y = [1] >>> x += [2] >>> x, y # return ([1, 2], [1, 2]) >>> x = x + [3] >>> x,y # return ([1, 2, 3], [1, 2]) That is because `+=` calls __iadd__ method while `+` calls __add__. Another example 👇

    Prikaži ovu nit
    Poništi
  10. 10. pro
    Poništi
  11. 9. pro

    nbdev: using Jupyter notebooks for package development, testing and continuous integration

    Poništi
  12. 6. pro

    Need some fake data? Faker package will generate them for you.

    Poništi
  13. 5. pro
    Poništi
  14. 4. pro

    Use np.isnan(), pd.isna() or math.isnan() to check for nan values: >>> np.nan == np.nan False >>> np.nan is math.nan False >>> math.isnan(np.nan) True >>> pd.isna(float('nan')) True >>> np.isnan(math.nan) True

    Poništi
  15. 4. pro

    Need to track notebooks changes or add comments? Try ReviewNB - an app for

    Poništi
  16. 2. pro

    Advent of Code is here. Happy coding!

    Poništi
  17. 1. pro

    Do you run long, time-demanding calculations in Jupyter Notebook? With `jupyter-notify` extension, you will get a browser notification when your calculation is done (=when the cell is completed) Example: 👇

    Poništi
  18. 28. stu

    To our US followers: >>> from cowsay import turkey >>> turkey('Happy Thanksgiving!') (inspired by )

    Poništi
  19. 27. stu

    by : Three easy ways to rearrange the columns in your DataFrame 👇👇 (Do you have a Python tip you want to share through this account? Submit it at or just mention in your tweet)

    Poništi
  20. 26. stu

    ADTK = new Python library for time series anomaly detection (from the same group `tsaug` = a Python package for time series augmentation, )

    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·