Database Reference
In-Depth Information
Python Pandas and BigQuery
One of the downsides of R is that it is poorly integrated with things outside
of scientific and statistical analysis. If you want to perform unsupervised
clustering, it is great, but if you want to integrate it with other code you have
written, it can be more difficult. R has fantastic library support for scientific
applications but lacks an ecosystem that can let you do things like request
and parse data from a website as easily as in other languages. Although R is
a Turing-complete programming language, nobody writes much code in R
unless they have to, so it remains a niche language.
Scientific Programming in Python
Python is used in a wide range of general-purpose programming
environments. It lacks, however, the kind of scientific and mathematical
functions that you get with R. Because Python is general purpose and a
hugely popular language, people have started to make up the gap between
Python and R by adding a number of libraries, most of which are
implemented in C++ or Fortran for performance reasons. Here is a list of
the primary Python mathematical and scientific libraries:
NumPy : Fast matrix manipulation and linear algebra
SciPy : More scientific computing goodies
SymPy : Symbolic math library
Pandas : Data analysis library
These libraries provide a lot of mathematical and scientific functions in
Python and make up some of the gap between Python and R (or even
commercial scientific computing environments such as Matlab or
Mathematica). These don't, however, provide the syntactic sugar that makes
R so easy to work with. Although writing Python code may be easier than
writing C++, the Python command shell is not as nice for scientific
workloads as the R shell. But Python has a library for that, too; iPython
provides a convenient notebook interface that enables you to save and
annotate your environment, much like the R shell.
But what if you want some functionality that is only available in R, or
functionality that you're used to in R and for which you don't want to learn
a new method? For these cases in which you really want to use something
in R, there is the RPy library, which enables you to call out to R functions
Search WWH ::




Custom Search