Closed timmie closed 11 years ago
@timmie best to do a PR for this. what is the online-editor supposed to do? (aside from the obvious)! does it allow you to edit docs directly?
Upon hitting the edit button, It should create a branch/fork and let you issue a PR on it: "Octotip: You are editing a file in a project you do not have write access to. We are forking this project for you (if one does not yet exist) to write your proposed changes to. Submitting a change to this file will write it to a new branch in your fork so you can send a pull request. "
I am not sure that is going to work; try building the docs like on this page: http://pandas.pydata.org/developers.html
It worked in the past: https://github.com/timmie/pandas/commit/b0dd6941976908735cf98ac6376471ef2706b613
thanks @timmie, pushed directly: f021e074b75523361cca99dad286c710c4f6a194
GitHub does not fork automatically in the online editor.
Here's my change:
the full file:
Slicing a multi-index with xs <http://stackoverflow.com/questions/12590131/how-to-slice-multindex-columns-in-pandas-dataframes>
__Slicing a multi-index with xs #2 <http://stackoverflow.com/questions/14964493/multiindex-based-indexing-in-pandas>
__Sorting
Prepending a level to a multiindex <http://stackoverflow.com/questions/14744068/prepend-a-level-to-a-pandas-multiindex>
__Flatten Hierarchical columns <http://stackoverflow.com/questions/14507794/python-pandas-how-to-flatten-a-hierarchical-index-in-columns>
__.. _cookbook.grouping:
Grouping
The :ref:
grouping <groupby>
docs.Basic grouping with apply <http://stackoverflow.com/questions/15322632/python-pandas-df-groupy-agg-column-reference-in-agg>
__Using get_group <http://stackoverflow.com/questions/14734533/how-to-access-pandas-groupby-dataframe-by-key>
__Apply to different items in a group <http://stackoverflow.com/questions/15262134/apply-different-functions-to-different-items-in-group-object-python-pandas>
__Expanding Apply <http://stackoverflow.com/questions/14542145/reductions-down-a-column-in-pandas>
__Replacing values with groupby means <http://stackoverflow.com/questions/14760757/replacing-values-with-groupby-means>
__Sort by group with aggregation <http://stackoverflow.com/questions/14941366/pandas-sort-by-group-aggregate-and-column>
__Create multiple aggregated columns <http://stackoverflow.com/questions/14897100/create-multiple-columns-in-pandas-aggregation-function>
__Expanding Data
Splitting a frame <http://stackoverflow.com/questions/13353233/best-way-to-split-a-dataframe-given-an-edge/15449992#15449992>
__.. _cookbook.pivot:
Pivot
The :ref:
Resample <timeseries.resampling>
docs.TimeGrouping of values grouped across time <http://stackoverflow.com/questions/15297053/how-can-i-divide-single-values-of-a-dataframe-by-monthly-averages>
__TimeGrouping #2 <http://stackoverflow.com/questions/14569223/timegrouper-pandas>
__Resampling with custom periods <http://stackoverflow.com/questions/15408156/resampling-with-custom-periods>
__Resample intraday frame without adding new days <http://stackoverflow.com/questions/14898574/resample-intrday-pandas-dataframe-without-add-new-days>
__Resample minute data <http://stackoverflow.com/questions/14861023/resampling-minute-data>
__.. _cookbook.merge:
Merge
The :ref:
Concat <merging.concatenation>
docs. The :ref:Join <merging.join>
docs.emulate R rbind <http://stackoverflow.com/questions/14988480/pandas-version-of-rbind>
__Self Join <https://github.com/pydata/pandas/issues/2996>
__How to set the index and join <http://stackoverflow.com/questions/14341805/pandas-merge-pd-merge-how-to-set-the-index-and-join>
__KDB like asof join <http://stackoverflow.com/questions/12322289/kdb-like-asof-join-for-timeseries-data-in-pandas/12336039#12336039>
__Join with a criteria based on the values <http://stackoverflow.com/questions/15581829/how-to-perform-an-inner-or-outer-join-of-dataframes-with-pandas-on-non-simplisti>
__.. _cookbook.plotting:
Plotting
The :ref:
Plotting <visualization>
docs.Make Matplotlib look like R <http://stackoverflow.com/questions/14349055/making-matplotlib-graphs-look-like-r-by-default>
__Setting x-axis major and minor labels <http://stackoverflow.com/questions/12945971/pandas-timeseries-plot-setting-x-axis-major-and-minor-ticks-and-labels>
__Data In/Out
.. _cookbook.csv:
CSV
The :ref:
SQL <io.sql>
docsReading from databases with SQL <http://stackoverflow.com/questions/10065051/python-pandas-and-databases-like-mysql>
__.. _cookbook.excel:
Excel
The :ref:
HDFStores <io.hdf5>
docsSimple Queries with a Timestamp Index <http://stackoverflow.com/questions/13926089/selecting-columns-from-pandas-hdfstore-table>
__Managing heteregenous data using a linked multiple table hierarchy <https://github.com/pydata/pandas/issues/3032>
__Merging on-disk tables with millions of rows <http://stackoverflow.com/questions/14614512/merging-two-tables-with-millions-of-rows-in-python/14617925#14617925>
__Large Data work flows <http://stackoverflow.com/questions/14262433/large-data-work-flows-using-pandas>
__Troubleshoot HDFStore exceptions <http://stackoverflow.com/questions/15488809/how-to-trouble-shoot-hdfstore-exception-cannot-find-the-correct-atom-type>
__Storing Attributes to a group node
.. ipython:: python
.. ipython:: python :suppress:
Miscellaneous
The :ref:
Timedeltas <timeseries.timedeltas>
docs.Operating with timedeltas <https://github.com/pydata/pandas/pull/2899>
__Create timedeltas with date differences <http://stackoverflow.com/questions/15683588/iterating-through-a-pandas-dataframe>
__Aliasing Axis Names
To globally provide aliases for axis names, one can define these 2 functions:
.. ipython:: python
def set_axis_alias(cls, axis, alias): if axis not in cls._AXIS_NUMBERS: raise Exception("invalid axis [%s] for alias [%s]" % (axis, alias)) cls._AXIS_ALIASES[alias] = axis
def clear_axis_alias(cls, axis, alias): if axis not in cls._AXIS_NUMBERS: raise Exception("invalid axis [%s] for alias [%s]" % (axis, alias)) cls._AXIS_ALIASES.pop(alias,None)
set_axis_alias(DataFrame,'columns', 'myaxis2') df2 = DataFrame(randn(3,2),columns=['c1','c2'],index=['i1','i2','i3']) df2.sum(axis='myaxis2') clear_axis_alias(DataFrame,'columns', 'myaxis2')