

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>pandas.DataFrame.quantile &#8212; pandas 0.24.0.dev0+81.g8d5032a8c.dirty documentation</title>
    <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="pandas.DataFrame.query" href="pandas.DataFrame.query.html" />
    <link rel="prev" title="pandas.DataFrame.product" href="pandas.DataFrame.product.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pandas.DataFrame.query.html" title="pandas.DataFrame.query"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="pandas.DataFrame.product.html" title="pandas.DataFrame.product"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">pandas 0.24.0.dev0+81.g8d5032a8c.dirty documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../api.html" >API Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="pandas.DataFrame.html" accesskey="U">pandas.DataFrame</a> &#187;</li> 
      </ul>
    </div>
<div class="content-wrapper">
    <div class="content">
        <div class="document">
            <div class="sphinxsidebar">
                <h3>Table Of Contents</h3>
                <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../whatsnew.html">What’s New</a></li>
<li class="toctree-l1"><a class="reference internal" href="../install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../contributing.html">Contributing to pandas</a></li>
<li class="toctree-l1"><a class="reference internal" href="../overview.html">Package overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../10min.html">10 Minutes to pandas</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cookbook.html">Cookbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dsintro.html">Intro to Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../basics.html">Essential Basic Functionality</a></li>
<li class="toctree-l1"><a class="reference internal" href="../text.html">Working with Text Data</a></li>
<li class="toctree-l1"><a class="reference internal" href="../options.html">Options and Settings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../indexing.html">Indexing and Selecting Data</a></li>
<li class="toctree-l1"><a class="reference internal" href="../advanced.html">MultiIndex / Advanced Indexing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../computation.html">Computational tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../missing_data.html">Working with missing data</a></li>
<li class="toctree-l1"><a class="reference internal" href="../groupby.html">Group By: split-apply-combine</a></li>
<li class="toctree-l1"><a class="reference internal" href="../merging.html">Merge, join, and concatenate</a></li>
<li class="toctree-l1"><a class="reference internal" href="../reshaping.html">Reshaping and Pivot Tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="../timeseries.html">Time Series / Date functionality</a></li>
<li class="toctree-l1"><a class="reference internal" href="../timedeltas.html">Time Deltas</a></li>
<li class="toctree-l1"><a class="reference internal" href="../categorical.html">Categorical Data</a></li>
<li class="toctree-l1"><a class="reference internal" href="../visualization.html">Visualization</a></li>
<li class="toctree-l1"><a class="reference internal" href="../style.html">Styling</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io.html">IO Tools (Text, CSV, HDF5, …)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../enhancingperf.html">Enhancing Performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sparse.html">Sparse data structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../gotchas.html">Frequently Asked Questions (FAQ)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../r_interface.html">rpy2 / R interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ecosystem.html">pandas Ecosystem</a></li>
<li class="toctree-l1"><a class="reference internal" href="../comparison_with_r.html">Comparison with R / R libraries</a></li>
<li class="toctree-l1"><a class="reference internal" href="../comparison_with_sql.html">Comparison with SQL</a></li>
<li class="toctree-l1"><a class="reference internal" href="../comparison_with_sas.html">Comparison with SAS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../comparison_with_stata.html">Comparison with Stata</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../api.html#input-output">Input/Output</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#general-functions">General functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#series">Series</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../api.html#dataframe">DataFrame</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../api.html#id1">Constructor</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#attributes-and-underlying-data">Attributes and underlying data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id2">Conversion</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id3">Indexing, iteration</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id4">Binary operator functions</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id5">Function application, GroupBy &amp; Window</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../api.html#api-dataframe-stats">Computations / Descriptive Stats</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.abs.html">pandas.DataFrame.abs</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.all.html">pandas.DataFrame.all</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.any.html">pandas.DataFrame.any</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.clip.html">pandas.DataFrame.clip</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.clip_lower.html">pandas.DataFrame.clip_lower</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.clip_upper.html">pandas.DataFrame.clip_upper</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.compound.html">pandas.DataFrame.compound</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.corr.html">pandas.DataFrame.corr</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.corrwith.html">pandas.DataFrame.corrwith</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.count.html">pandas.DataFrame.count</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.cov.html">pandas.DataFrame.cov</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.cummax.html">pandas.DataFrame.cummax</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.cummin.html">pandas.DataFrame.cummin</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.cumprod.html">pandas.DataFrame.cumprod</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.cumsum.html">pandas.DataFrame.cumsum</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.describe.html">pandas.DataFrame.describe</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.diff.html">pandas.DataFrame.diff</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.eval.html">pandas.DataFrame.eval</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.kurt.html">pandas.DataFrame.kurt</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.kurtosis.html">pandas.DataFrame.kurtosis</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.mad.html">pandas.DataFrame.mad</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.max.html">pandas.DataFrame.max</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.mean.html">pandas.DataFrame.mean</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.median.html">pandas.DataFrame.median</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.min.html">pandas.DataFrame.min</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.mode.html">pandas.DataFrame.mode</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.pct_change.html">pandas.DataFrame.pct_change</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.prod.html">pandas.DataFrame.prod</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.product.html">pandas.DataFrame.product</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">pandas.DataFrame.quantile</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.rank.html">pandas.DataFrame.rank</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.round.html">pandas.DataFrame.round</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.sem.html">pandas.DataFrame.sem</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.skew.html">pandas.DataFrame.skew</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.sum.html">pandas.DataFrame.sum</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.std.html">pandas.DataFrame.std</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.var.html">pandas.DataFrame.var</a></li>
<li class="toctree-l4"><a class="reference internal" href="pandas.DataFrame.nunique.html">pandas.DataFrame.nunique</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id7">Reindexing / Selection / Label manipulation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#api-dataframe-missing">Missing data handling</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#reshaping-sorting-transposing">Reshaping, sorting, transposing</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id9">Combining / joining / merging</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id10">Time series-related</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#api-dataframe-plotting">Plotting</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id12">Serialization / IO / Conversion</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#id13">Sparse</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#panel">Panel</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#index">Index</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#numeric-index">Numeric Index</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#categoricalindex">CategoricalIndex</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#intervalindex">IntervalIndex</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#multiindex">MultiIndex</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#datetimeindex">DatetimeIndex</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#timedeltaindex">TimedeltaIndex</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#periodindex">PeriodIndex</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#scalars">Scalars</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#frequencies">Frequencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#window">Window</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#groupby">GroupBy</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#resampling">Resampling</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#style">Style</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#id43">Plotting</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#general-utility-functions">General utility functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#extensions">Extensions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../developer.html">Developer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../internals.html">Internals</a></li>
<li class="toctree-l1"><a class="reference internal" href="../extending.html">Extending Pandas</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release.html">Release Notes</a></li>
</ul>

                <h3 style="margin-top: 1.5em;">Search</h3>

                <form class="search" action="../search.html" method="get">
                    <input type="text" name="q" size="18"/>
                    <input type="submit" value="Go"/>
                    <input type="hidden" name="check_keywords" value="yes"/>
                    <input type="hidden" name="area" value="default"/>
                </form>
                <p class="searchtip" style="font-size: 90%">
                    Enter search terms or a module, class or function name.
                </p>

            </div>
             
            <div class="documentwrapper">
                <div class="bodywrapper">
                    <div class="body">
                        
  <div class="section" id="pandas-dataframe-quantile">
<h1>pandas.DataFrame.quantile<a class="headerlink" href="#pandas-dataframe-quantile" title="Permalink to this headline">¶</a></h1>
<dl class="method">
<dt id="pandas.DataFrame.quantile">
<code class="descclassname">DataFrame.</code><code class="descname">quantile</code><span class="sig-paren">(</span><em>q=0.5</em>, <em>axis=0</em>, <em>numeric_only=True</em>, <em>interpolation='linear'</em><span class="sig-paren">)</span><a class="reference external" href="http://github.com/pandas-dev/pandas/blob/master/pandas/core/frame.py#L7083-L7175"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pandas.DataFrame.quantile" title="Permalink to this definition">¶</a></dt>
<dd><p>Return values at the given quantile over requested axis, a la
numpy.percentile.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>q</strong> : float or array-like, default 0.5 (50% quantile)</p>
<blockquote>
<div><p>0 &lt;= q &lt;= 1, the quantile(s) to compute</p>
</div></blockquote>
<p><strong>axis</strong> : {0, 1, ‘index’, ‘columns’} (default 0)</p>
<blockquote>
<div><p>0 or ‘index’ for row-wise, 1 or ‘columns’ for column-wise</p>
</div></blockquote>
<p><strong>numeric_only</strong> : boolean, default True</p>
<blockquote>
<div><p>If False, the quantile of datetime and timedelta data will be
computed as well</p>
</div></blockquote>
<p><strong>interpolation</strong> : {‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}</p>
<blockquote>
<div><div class="versionadded">
<p><span class="versionmodified">New in version 0.18.0.</span></p>
</div>
<p>This optional parameter specifies the interpolation method to use,
when the desired quantile lies between two data points <cite>i</cite> and <cite>j</cite>:</p>
<ul class="simple">
<li>linear: <cite>i + (j - i) * fraction</cite>, where <cite>fraction</cite> is the
fractional part of the index surrounded by <cite>i</cite> and <cite>j</cite>.</li>
<li>lower: <cite>i</cite>.</li>
<li>higher: <cite>j</cite>.</li>
<li>nearest: <cite>i</cite> or <cite>j</cite> whichever is nearest.</li>
<li>midpoint: (<cite>i</cite> + <cite>j</cite>) / 2.</li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>quantiles</strong> : Series or DataFrame</p>
<blockquote class="last">
<div><ul class="simple">
<li>If <code class="docutils literal notranslate"><span class="pre">q</span></code> is an array, a DataFrame will be returned where the
index is <code class="docutils literal notranslate"><span class="pre">q</span></code>, the columns are the columns of self, and the
values are the quantiles.</li>
<li>If <code class="docutils literal notranslate"><span class="pre">q</span></code> is a float, a Series will be returned where the
index is the columns of self and the values are the quantiles.</li>
</ul>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="pandas.core.window.Rolling.quantile.html#pandas.core.window.Rolling.quantile" title="pandas.core.window.Rolling.quantile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pandas.core.window.Rolling.quantile</span></code></a></p>
</div>
<p class="rubric">Examples</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">10</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">],</span> <span class="p">[</span><span class="mi">4</span><span class="p">,</span> <span class="mi">100</span><span class="p">]]),</span>
<span class="go">                      columns=[&#39;a&#39;, &#39;b&#39;])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">df</span><span class="o">.</span><span class="n">quantile</span><span class="p">(</span><span class="o">.</span><span class="mi">1</span><span class="p">)</span>
<span class="go">a    1.3</span>
<span class="go">b    3.7</span>
<span class="go">dtype: float64</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">df</span><span class="o">.</span><span class="n">quantile</span><span class="p">([</span><span class="o">.</span><span class="mi">1</span><span class="p">,</span> <span class="o">.</span><span class="mi">5</span><span class="p">])</span>
<span class="go">       a     b</span>
<span class="go">0.1  1.3   3.7</span>
<span class="go">0.5  2.5  55.0</span>
</pre></div>
</div>
<p>Specifying <cite>numeric_only=False</cite> will also compute the quantile of
datetime and timedelta data.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s1">&#39;A&#39;</span><span class="p">:</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
<span class="go">                       &#39;B&#39;: [pd.Timestamp(&#39;2010&#39;),</span>
<span class="go">                             pd.Timestamp(&#39;2011&#39;)],</span>
<span class="go">                       &#39;C&#39;: [pd.Timedelta(&#39;1 days&#39;),</span>
<span class="go">                             pd.Timedelta(&#39;2 days&#39;)]})</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">df</span><span class="o">.</span><span class="n">quantile</span><span class="p">(</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">numeric_only</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="go">A                    1.5</span>
<span class="go">B    2010-07-02 12:00:00</span>
<span class="go">C        1 days 12:00:00</span>
<span class="go">Name: 0.5, dtype: object</span>
</pre></div>
</div>
</dd></dl>

</div>


                    </div>
                </div>
            </div>

            
            <div class="clearer"></div>
        </div>
    </div>
</div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pandas.DataFrame.query.html" title="pandas.DataFrame.query"
             >next</a> |</li>
        <li class="right" >
          <a href="pandas.DataFrame.product.html" title="pandas.DataFrame.product"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">pandas 0.24.0.dev0+81.g8d5032a8c.dirty documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../api.html" >API Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="pandas.DataFrame.html" >pandas.DataFrame</a> &#187;</li> 
      </ul>
    </div>
<style type="text/css">
    .scrollToTop {
        text-align: center;
        font-weight: bold;
        position: fixed;
        bottom: 60px;
        right: 40px;
        display: none;
    }
</style>
<a href="#" class="scrollToTop">Scroll To Top</a>
<script type="text/javascript">
$(document).ready(function() {
    //Check to see if the window is top if not then display button
    $(window).scroll(function() {
        if ($(this).scrollTop() > 200) {
            $('.scrollToTop').fadeIn();
        } else {
            $('.scrollToTop').fadeOut();
        }
    });

    //Click event to scroll to top
    $('.scrollToTop').click(function() {
        $('html, body').animate({
            scrollTop: 0
        }, 500);
        return false;
    });
});
</script>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27880019-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

  </body>
</html>