Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "libraries"


10 Python Built-in Functions Every Data Scientist Should Know

  • For instance, numpy and pandas are great data analysis libraries.
  • There are many more useful libraries for data science in python ecosystem.
  • Set function returns a set object from an iterable (e.g. a list).
  • One use case of sets is to remove duplicate values from a list or tuple.
  • We may need to sort a list or pandas series when doing data cleaning and processing.
  • Zip function takes iterables as argument and returns an iterator consists of tuples.
  • For instance, range(0,10,2) returns a sequence that starts at 0 and stops at 10 (10 is exclusive) with increments of 2.
  • We used map function to square each element of list a.
  • List comprehension is preferable over map function in most cases due to its speed and simpler syntax.
  • We can create a list from a range, set, pandas series, numpy array, or any other iterable.

save | comments | report | share on


A philosophical difference between Haskell and Lisp

  • One difference in philosophy of Lisp (e.g. Common Lisp, Emacs Lisp) and Haskell is that the latter makes liberal use of many tiny functions that do one single task.
  • This is known as composability, or the UNIX philosophy.
  • This is known as monolithism, or to make procedures like a kitchen-sink, or a Swiss-army knife.
  • Having written my fair share of non-trivial Emacs Lisp (and a small share of Common Lisp; I’ve maintained Common Lisp systems) and my fair share of non-trivial Haskell I think I’m in a position to judge.
  • Like pipes in UNIX, the functions are clever enough to be performant when composed together–we don’t traverse the whole list and generate a new list each time, each item is generated on demand.
  • The most pathological example of such a kitchen sink in Lisp is the well known LOOP macro.
  • Such an advantage can also be applied to other pure languages like Idris or PureScript or Elm.

save | comments | report | share on