├── bench ├── larry.py ├── bench_dense_to_sparse.py ├── bench_pivot.py ├── alignment.py ├── duplicated.R ├── bench_pivot.R ├── zoo_bench.py └── bench_get_put_value.py ├── doc ├── source │ ├── _static │ │ ├── stub │ │ ├── eval-perf.png │ │ ├── legacy_0.10.h5 │ │ ├── query-perf.png │ │ ├── trunc_after.png │ │ ├── trunc_before.png │ │ ├── eval-perf-small.png │ │ ├── new-excel-index.png │ │ ├── old-excel-index.png │ │ ├── whatsnew_assign.png │ │ ├── df_repr_truncated.png │ │ ├── option_unicode01.png │ │ ├── option_unicode02.png │ │ ├── option_unicode03.png │ │ ├── option_unicode04.png │ │ ├── query-perf-small.png │ │ └── whatsnew_plot_submethods.png │ ├── style.rst │ ├── themes │ │ └── nature_with_gtoc │ │ │ └── theme.conf │ └── whatsnew │ │ ├── v0.7.2.txt │ │ └── v0.7.1.txt ├── sphinxext │ ├── ipython_sphinxext │ │ └── __init__.py │ ├── numpydoc │ │ ├── __init__.py │ │ └── tests │ │ │ ├── test_linkcode.py │ │ │ ├── test_traitsdoc.py │ │ │ ├── test_phantom_import.py │ │ │ └── test_plot_directive.py │ └── README.rst ├── data │ ├── fx_prices │ ├── test.xls │ └── mindex_ex.csv ├── logo │ ├── pandas_logo.png │ └── pandas_logo.py ├── cheatsheet │ ├── Pandas_Cheat_Sheet.pdf │ ├── Pandas_Cheat_Sheet.pptx │ └── README.txt ├── _templates │ ├── autosummary │ │ ├── class_without_autosummary.rst │ │ ├── accessor.rst │ │ ├── accessor_method.rst │ │ ├── accessor_attribute.rst │ │ ├── accessor_callable.rst │ │ └── class.rst │ └── api_redirect.html └── plots │ └── stats │ ├── moments_ewma.py │ ├── moments_ewmvol.py │ ├── moments_rolling_binary.py │ ├── moment_plots.py │ ├── moments_rolling.py │ └── moments_expw.py ├── pandas ├── core │ ├── __init__.py │ ├── index.py │ └── sparse.py ├── io │ ├── __init__.py │ ├── sas │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ ├── json │ │ │ ├── __init__.py │ │ │ └── data │ │ │ │ ├── tsframe_iso_v012.json │ │ │ │ └── tsframe_v012.json │ │ ├── parser │ │ │ ├── __init__.py │ │ │ └── data │ │ │ │ ├── test_mmap.csv │ │ │ │ ├── test1.csv.gz │ │ │ │ ├── utf16_ex.txt │ │ │ │ ├── salaries.csv.gz │ │ │ │ ├── salaries.csv.xz │ │ │ │ ├── test1.csv.bz2 │ │ │ │ ├── salaries.csv.bz2 │ │ │ │ ├── salaries.csv.zip │ │ │ │ ├── sauron.SHIFT_JIS.csv │ │ │ │ ├── unicode_series.csv │ │ │ │ ├── test2.csv │ │ │ │ ├── test1.csv │ │ │ │ └── salaries.csv │ │ ├── data │ │ │ ├── test_mmap.csv │ │ │ ├── blank.xls │ │ │ ├── test1.xls │ │ │ ├── test2.xls │ │ │ ├── test3.xls │ │ │ ├── test4.xls │ │ │ ├── test5.xls │ │ │ ├── S4_EDUC1.dta │ │ │ ├── blank.xlsm │ │ │ ├── blank.xlsx │ │ │ ├── stata15.dta │ │ │ ├── test1.xlsm │ │ │ ├── test1.xlsx │ │ │ ├── test2.xlsm │ │ │ ├── test2.xlsx │ │ │ ├── test3.xlsm │ │ │ ├── test3.xlsx │ │ │ ├── test4.xlsm │ │ │ ├── test4.xlsx │ │ │ ├── test5.xlsm │ │ │ ├── test5.xlsx │ │ │ ├── stata1_114.dta │ │ │ ├── stata1_117.dta │ │ │ ├── stata2_113.dta │ │ │ ├── stata2_114.dta │ │ │ ├── stata2_115.dta │ │ │ ├── stata2_117.dta │ │ │ ├── stata3_113.dta │ │ │ ├── stata3_114.dta │ │ │ ├── stata3_115.dta │ │ │ ├── stata3_117.dta │ │ │ ├── stata4_113.dta │ │ │ ├── stata4_114.dta │ │ │ ├── stata4_115.dta │ │ │ ├── stata4_117.dta │ │ │ ├── stata5_113.dta │ │ │ ├── stata5_114.dta │ │ │ ├── stata5_115.dta │ │ │ ├── stata5_117.dta │ │ │ ├── stata6_113.dta │ │ │ ├── stata6_114.dta │ │ │ ├── stata6_115.dta │ │ │ ├── stata6_117.dta │ │ │ ├── stata7_111.dta │ │ │ ├── stata7_115.dta │ │ │ ├── stata7_117.dta │ │ │ ├── stata8_113.dta │ │ │ ├── stata8_115.dta │ │ │ ├── stata8_117.dta │ │ │ ├── stata9_115.dta │ │ │ ├── stata9_117.dta │ │ │ ├── test_types.xls │ │ │ ├── testdtype.xls │ │ │ ├── testdtype.xlsm │ │ │ ├── testdtype.xlsx │ │ │ ├── times_1900.xls │ │ │ ├── times_1904.xls │ │ │ ├── stata10_115.dta │ │ │ ├── stata10_117.dta │ │ │ ├── stata11_115.dta │ │ │ ├── stata11_117.dta │ │ │ ├── stata12_117.dta │ │ │ ├── stata14_118.dta │ │ │ ├── test_squeeze.xls │ │ │ ├── test_squeeze.xlsm │ │ │ ├── test_squeeze.xlsx │ │ │ ├── test_types.xlsm │ │ │ ├── test_types.xlsx │ │ │ ├── testskiprows.xls │ │ │ ├── testskiprows.xlsm │ │ │ ├── testskiprows.xlsx │ │ │ ├── times_1900.xlsm │ │ │ ├── times_1900.xlsx │ │ │ ├── times_1904.xlsm │ │ │ ├── times_1904.xlsx │ │ │ ├── stata1_encoding.dta │ │ │ ├── test_converters.xls │ │ │ ├── test_multisheet.xls │ │ │ ├── testmultiindex.xls │ │ │ ├── testmultiindex.xlsm │ │ │ ├── testmultiindex.xlsx │ │ │ ├── blank_with_header.xls │ │ │ ├── blank_with_header.xlsm │ │ │ ├── blank_with_header.xlsx │ │ │ ├── legacy_hdf │ │ │ │ ├── legacy.h5 │ │ │ │ ├── legacy_0.10.h5 │ │ │ │ ├── legacy_table.h5 │ │ │ │ ├── pytables_native.h5 │ │ │ │ ├── datetimetz_object.h5 │ │ │ │ ├── legacy_table_0.11.h5 │ │ │ │ └── pytables_native2.h5 │ │ │ ├── test_converters.xlsm │ │ │ ├── test_converters.xlsx │ │ │ ├── test_multisheet.xlsm │ │ │ ├── test_multisheet.xlsx │ │ │ ├── testdateoverflow.xls │ │ │ ├── testdateoverflow.xlsm │ │ │ ├── testdateoverflow.xlsx │ │ │ ├── categorical_0_15_2.pickle │ │ │ ├── test_index_name_pre17.xls │ │ │ ├── test_index_name_pre17.xlsm │ │ │ ├── test_index_name_pre17.xlsx │ │ │ ├── html_encoding │ │ │ │ ├── letz_latin1.html │ │ │ │ ├── chinese_utf-16.html │ │ │ │ ├── chinese_utf-32.html │ │ │ │ └── chinese_utf-8.html │ │ │ ├── legacy_pickle │ │ │ │ ├── 0.10.1 │ │ │ │ │ ├── AMD64_windows_2.7.3.pickle │ │ │ │ │ └── x86_64_linux_2.7.3.pickle │ │ │ │ ├── 0.11.0 │ │ │ │ │ ├── x86_64_linux_2.7.3.pickle │ │ │ │ │ ├── x86_64_linux_3.3.0.pickle │ │ │ │ │ └── 0.11.0_x86_64_linux_3.3.0.pickle │ │ │ │ ├── 0.13.0 │ │ │ │ │ ├── 0.13.0_i686_linux_2.6.5.pickle │ │ │ │ │ ├── 0.13.0_i686_linux_2.7.3.pickle │ │ │ │ │ ├── 0.13.0_i686_linux_3.2.3.pickle │ │ │ │ │ ├── 0.13.0_AMD64_windows_2.7.3.pickle │ │ │ │ │ ├── 0.13.0_x86_64_darwin_2.7.5.pickle │ │ │ │ │ ├── 0.13.0_x86_64_darwin_2.7.6.pickle │ │ │ │ │ ├── 0.13.0_x86_64_linux_2.7.3.pickle │ │ │ │ │ ├── 0.13.0_x86_64_linux_2.7.8.pickle │ │ │ │ │ └── 0.13.0_x86_64_linux_3.3.0.pickle │ │ │ │ ├── 0.12.0 │ │ │ │ │ ├── 0.12.0_AMD64_windows_2.7.3.pickle │ │ │ │ │ └── 0.12.0_x86_64_linux_2.7.3.pickle │ │ │ │ ├── 0.14.0 │ │ │ │ │ ├── 0.14.0_x86_64_darwin_2.7.6.pickle │ │ │ │ │ └── 0.14.0_x86_64_linux_2.7.8.pickle │ │ │ │ ├── 0.14.1 │ │ │ │ │ ├── 0.14.1_x86_64_linux_2.7.8.pickle │ │ │ │ │ └── 0.14.1_x86_64_darwin_2.7.12.pickle │ │ │ │ ├── 0.15.0 │ │ │ │ │ ├── 0.15.0_x86_64_linux_2.7.8.pickle │ │ │ │ │ └── 0.15.0_x86_64_darwin_2.7.12.pickle │ │ │ │ ├── 0.15.2 │ │ │ │ │ └── 0.15.2_x86_64_darwin_2.7.9.pickle │ │ │ │ ├── 0.16.0 │ │ │ │ │ └── 0.16.0_x86_64_darwin_2.7.9.pickle │ │ │ │ ├── 0.16.2 │ │ │ │ │ ├── 0.16.2_AMD64_windows_3.4.3.pickle │ │ │ │ │ ├── 0.16.2_x86_64_darwin_2.7.9.pickle │ │ │ │ │ ├── 0.16.2_x86_64_darwin_3.4.3.pickle │ │ │ │ │ ├── 0.16.2_x86_64_linux_2.7.10.pickle │ │ │ │ │ ├── 0.16.2_x86_64_linux_3.4.3.pickle │ │ │ │ │ ├── 0.16.2_AMD64_windows_2.7.10.pickle │ │ │ │ │ └── 0.16.2_x86_64_darwin_2.7.10.pickle │ │ │ │ ├── 0.17.0 │ │ │ │ │ ├── 0.17.0_AMD64_windows_3.4.4.pickle │ │ │ │ │ ├── 0.17.0_x86_64_darwin_3.4.4.pickle │ │ │ │ │ ├── 0.17.0_x86_64_linux_2.7.11.pickle │ │ │ │ │ ├── 0.17.0_x86_64_linux_3.4.4.pickle │ │ │ │ │ ├── 0.17.0_AMD64_windows_2.7.11.pickle │ │ │ │ │ ├── 0.17.0_x86_64_darwin_2.7.11.pickle │ │ │ │ │ └── 0.17.1_AMD64_windows_2.7.11.pickle │ │ │ │ ├── 0.18.0 │ │ │ │ │ ├── 0.18.0_AMD64_windows_3.5.1.pickle │ │ │ │ │ ├── 0.18.0_x86_64_darwin_3.5.1.pickle │ │ │ │ │ ├── 0.18.0_AMD64_windows_2.7.11.pickle │ │ │ │ │ └── 0.18.0_x86_64_darwin_2.7.11.pickle │ │ │ │ ├── 0.18.1 │ │ │ │ │ ├── 0.18.1_x86_64_darwin_3.5.2.pickle │ │ │ │ │ └── 0.18.1_x86_64_darwin_2.7.12.pickle │ │ │ │ └── 0.17.1 │ │ │ │ │ ├── 0.17.1_AMD64_windows_2.7.11.pickle │ │ │ │ │ └── 0.17.1_x86_64_darwin_2.7.11.pickle │ │ │ ├── legacy_msgpack │ │ │ │ ├── 0.16.0 │ │ │ │ │ └── 0.16.0_x86_64_darwin_2.7.9.msgpack │ │ │ │ ├── 0.16.2 │ │ │ │ │ ├── 0.16.2_AMD64_windows_2.7.10.msgpack │ │ │ │ │ ├── 0.16.2_AMD64_windows_3.4.3.msgpack │ │ │ │ │ ├── 0.16.2_x86_64_darwin_2.7.10.msgpack │ │ │ │ │ ├── 0.16.2_x86_64_darwin_2.7.9.msgpack │ │ │ │ │ ├── 0.16.2_x86_64_darwin_3.4.3.msgpack │ │ │ │ │ ├── 0.16.2_x86_64_linux_2.7.10.msgpack │ │ │ │ │ └── 0.16.2_x86_64_linux_3.4.3.msgpack │ │ │ │ ├── 0.17.0 │ │ │ │ │ ├── 0.17.0_AMD64_windows_2.7.11.msgpack │ │ │ │ │ ├── 0.17.0_AMD64_windows_3.4.4.msgpack │ │ │ │ │ ├── 0.17.0_x86_64_darwin_2.7.11.msgpack │ │ │ │ │ ├── 0.17.0_x86_64_darwin_3.4.4.msgpack │ │ │ │ │ ├── 0.17.0_x86_64_linux_2.7.11.msgpack │ │ │ │ │ ├── 0.17.0_x86_64_linux_3.4.4.msgpack │ │ │ │ │ ├── 0.17.1_AMD64_windows_2.7.11.msgpack │ │ │ │ │ └── 0.17.1_AMD64_windows_3.5.1.msgpack │ │ │ │ ├── 0.17.1 │ │ │ │ │ ├── 0.17.1_AMD64_windows_2.7.11.msgpack │ │ │ │ │ ├── 0.17.1_AMD64_windows_3.5.1.msgpack │ │ │ │ │ ├── 0.17.1_x86_64_darwin_2.7.11.msgpack │ │ │ │ │ ├── 0.17.1_x86_64_darwin_3.5.1.msgpack │ │ │ │ │ ├── 0.17.1_x86_64_linux_2.7.11.msgpack │ │ │ │ │ └── 0.17.1_x86_64_linux_3.4.4.msgpack │ │ │ │ ├── 0.18.0 │ │ │ │ │ ├── 0.18.0_AMD64_windows_2.7.11.msgpack │ │ │ │ │ ├── 0.18.0_AMD64_windows_3.5.1.msgpack │ │ │ │ │ ├── 0.18.0_x86_64_darwin_2.7.11.msgpack │ │ │ │ │ └── 0.18.0_x86_64_darwin_3.5.1.msgpack │ │ │ │ └── 0.18.1 │ │ │ │ │ ├── 0.18.1_x86_64_darwin_2.7.12.msgpack │ │ │ │ │ └── 0.18.1_x86_64_darwin_3.5.2.msgpack │ │ │ ├── test1.csv │ │ │ ├── stata6.csv │ │ │ ├── gbq_fake_job.txt │ │ │ ├── categorical_0_14_1.pickle │ │ │ └── stata5.csv │ │ ├── sas │ │ │ ├── data │ │ │ │ ├── DEMO_G.xpt │ │ │ │ ├── DRXFCD_G.xpt │ │ │ │ ├── SSHSV1_A.xpt │ │ │ │ ├── test1.sas7bdat │ │ │ │ ├── test10.sas7bdat │ │ │ │ ├── test11.sas7bdat │ │ │ │ ├── test12.sas7bdat │ │ │ │ ├── test13.sas7bdat │ │ │ │ ├── test14.sas7bdat │ │ │ │ ├── test15.sas7bdat │ │ │ │ ├── test16.sas7bdat │ │ │ │ ├── test2.sas7bdat │ │ │ │ ├── test3.sas7bdat │ │ │ │ ├── test4.sas7bdat │ │ │ │ ├── test5.sas7bdat │ │ │ │ ├── test6.sas7bdat │ │ │ │ ├── test7.sas7bdat │ │ │ │ ├── test8.sas7bdat │ │ │ │ ├── test9.sas7bdat │ │ │ │ ├── airline.sas7bdat │ │ │ │ ├── paxraw_d_short.xpt │ │ │ │ ├── test_12659.sas7bdat │ │ │ │ └── productsales.sas7bdat │ │ │ └── test_sas.py │ │ └── test_s3.py │ ├── wb.py │ ├── data.py │ ├── api.py │ └── s3.py ├── util │ ├── __init__.py │ └── clipboard │ │ └── exceptions.py ├── api │ ├── tests │ │ └── __init__.py │ ├── __init__.py │ └── types │ │ └── __init__.py ├── formats │ └── __init__.py ├── indexes │ └── __init__.py ├── rpy │ ├── tests │ │ └── __init__.py │ ├── mass.py │ ├── base.py │ ├── vars.py │ └── __init__.py ├── sparse │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ └── api.py ├── stats │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ ├── api.py │ └── common.py ├── tests │ ├── __init__.py │ ├── formats │ │ ├── __init__.py │ │ └── data │ │ │ └── unicode_series.csv │ ├── frame │ │ ├── __init__.py │ │ └── test_validate.py │ ├── groupby │ │ └── __init__.py │ ├── indexes │ │ ├── __init__.py │ │ └── data │ │ │ ├── mindex_073.pickle │ │ │ ├── s1-0.12.0.pickle │ │ │ └── s2-0.12.0.pickle │ ├── indexing │ │ └── __init__.py │ ├── plotting │ │ └── __init__.py │ ├── series │ │ ├── __init__.py │ │ ├── common.py │ │ └── test_validate.py │ ├── types │ │ └── __init__.py │ └── test_msgpack │ │ ├── __init__.py │ │ ├── test_subtype.py │ │ ├── test_buffer.py │ │ ├── test_unpack_raw.py │ │ ├── test_except.py │ │ └── test_seq.py ├── tools │ ├── __init__.py │ └── tests │ │ ├── __init__.py │ │ └── data │ │ ├── quotes.csv │ │ └── trades.csv ├── tseries │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── data │ │ │ ├── frame.pickle │ │ │ ├── series.pickle │ │ │ ├── cday-0.14.1.pickle │ │ │ ├── daterange_073.pickle │ │ │ └── series_daterange0.pickle │ ├── api.py │ └── interval.py ├── types │ └── __init__.py ├── computation │ ├── tests │ │ └── __init__.py │ ├── api.py │ ├── common.py │ └── __init__.py ├── src │ ├── parser │ │ ├── .gitignore │ │ └── Makefile │ ├── klib │ │ └── ktypes.h │ ├── headers │ │ ├── portable.h │ │ ├── stdint.h │ │ └── math.h │ ├── skiplist.pxd │ ├── helper.h │ └── datetime_helper.h ├── msgpack │ ├── _version.py │ ├── exceptions.py │ └── __init__.py ├── lib.pxd ├── tslib.pxd ├── info.py ├── compat │ ├── chainmap.py │ └── openpyxl_compat.py └── hashtable.pxd ├── ci ├── requirements-2.7_SLOW.pip ├── requirements-3.6.pip ├── requirements-2.7_LOCALE.pip ├── requirements-2.7_COMPAT.pip ├── requirements-3.5_OSX.build ├── requirements-3.5_OSX.pip ├── requirements-3.5_NUMPY_DEV.run ├── requirements-3.5_ASCII.run ├── appveyor.recipe │ ├── bld.bat │ ├── build.sh │ └── meta.yaml ├── requirements-3.5.build ├── requirements-3.5_NUMPY_DEV.build ├── requirements-3.6.build ├── requirements-2.7_BUILD_TEST.build ├── requirements-3.4.build ├── requirements-3.5_ASCII.build ├── requirements-2.7_SLOW.build ├── requirements-3.4_SLOW.build ├── requirements-3.5_DOC_BUILD.build ├── requirements-2.7.build ├── requirements_dev.txt ├── requirements-2.7_COMPAT.build ├── travis_gbq.json.enc ├── requirements-2.7_LOCALE.build ├── requirements-3.4.pip ├── travis_gbq_config.txt ├── requirements-2.7.sh ├── requirements-3.5.sh ├── requirements-3.6.sh ├── requirements-3.5_OSX.sh ├── requirements-3.5_DOC_BUILD.sh ├── requirements-2.7.pip ├── requirements-3.4_SLOW.sh ├── requirements-3.4-64.run ├── requirements-3.5-64.run ├── requirements-3.6-64.run ├── run_build_docs.sh ├── requirements-3.5_OSX.run ├── requirements-3.4.run ├── requirements-2.7-64.run ├── requirements-3.5.run ├── requirements-2.7_SLOW.run ├── install_db.sh ├── requirements-3.4_SLOW.run ├── requirements-3.5_DOC_BUILD.run ├── requirements_all.txt ├── requirements-2.7_COMPAT.run ├── requirements-2.7_LOCALE.run ├── requirements-3.6.run ├── requirements-2.7.run ├── travis_process_gbq_encryption.sh ├── before_install_travis.sh ├── install_test.sh ├── requirements-3.5_NUMPY_DEV.sh ├── submit_cython_cache.sh ├── README.txt ├── check_cache.sh ├── print_versions.py ├── travis_encrypt_gbq.sh └── script.sh ├── vb_suite ├── source │ ├── _static │ │ └── stub │ └── themes │ │ └── agogo │ │ ├── static │ │ ├── bgtop.png │ │ └── bgfooter.png │ │ └── theme.conf ├── .gitignore ├── generate_rst_files.py ├── run_suite.py ├── categoricals.py ├── attrs_caching.py ├── pandas_vb_common.py ├── plotting.py ├── miscellaneous.py ├── timedelta.py ├── panel_methods.py ├── ctors.py └── replace.py ├── asv_bench └── benchmarks │ ├── __init__.py │ ├── panel_methods.py │ ├── pandas_vb_common.py │ ├── attrs_caching.py │ ├── ctors.py │ ├── timedelta.py │ └── plotting.py ├── conda.recipe ├── bld.bat ├── build.sh └── meta.yaml ├── test_fast.sh ├── test_multi.sh ├── test.bat ├── test_perf.sh ├── scripts ├── count_code.sh ├── runtests.py ├── winbuild_py27.bat ├── windows_builder │ ├── check_and_build.bat │ ├── readme.txt │ ├── build_27-32.bat │ ├── build_27-64.bat │ ├── build_34-32.bat │ └── build_34-64.bat ├── test_py27.bat ├── leak.py ├── faster_xs.py ├── boxplot_test.py ├── build_dist.sh ├── hdfstore_panel_perf.py ├── preepoch_test.py ├── roll_median_leak.py ├── groupby_speed.py ├── bench_join_multi.py ├── git_code_churn.py ├── touchup_gh_issues.py ├── bench_join.R └── bench_refactor.py ├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md ├── codecov.yml ├── RELEASE.md ├── .gitattributes ├── .binstar.yml ├── setup.cfg ├── Makefile ├── MANIFEST.in ├── LICENSES ├── MSGPACK_LICENSE ├── SAS7BDAT_LICENSE └── SIX ├── test_rebuild.sh ├── .coveragerc ├── test.sh └── release_stats.sh /bench/larry.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/source/_static/stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/io/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ci/requirements-2.7_SLOW.pip: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/api/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/formats/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/indexes/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/io/sas/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/io/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/rpy/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/sparse/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/stats/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tseries/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vb_suite/source/_static/stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /asv_bench/benchmarks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ci/requirements-3.6.pip: -------------------------------------------------------------------------------- 1 | xlwt 2 | -------------------------------------------------------------------------------- /pandas/io/tests/json/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/sparse/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/stats/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/formats/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/frame/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/groupby/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/indexes/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/indexing/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/plotting/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/series/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tools/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tseries/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/computation/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/io/tests/parser/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/tests/test_msgpack/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ci/requirements-2.7_LOCALE.pip: -------------------------------------------------------------------------------- 1 | blosc 2 | -------------------------------------------------------------------------------- /doc/sphinxext/ipython_sphinxext/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pandas/src/parser/.gitignore: -------------------------------------------------------------------------------- 1 | !*.c 2 | test* -------------------------------------------------------------------------------- /pandas/api/__init__.py: -------------------------------------------------------------------------------- 1 | """ public toolkit API """ 2 | -------------------------------------------------------------------------------- /pandas/msgpack/_version.py: -------------------------------------------------------------------------------- 1 | version = (0, 4, 6) 2 | -------------------------------------------------------------------------------- /ci/requirements-2.7_COMPAT.pip: -------------------------------------------------------------------------------- 1 | openpyxl 2 | argparse 3 | -------------------------------------------------------------------------------- /ci/requirements-3.5_OSX.build: -------------------------------------------------------------------------------- 1 | numpy=1.10.4 2 | cython 3 | -------------------------------------------------------------------------------- /ci/requirements-3.5_OSX.pip: -------------------------------------------------------------------------------- 1 | python-dateutil==2.5.3 2 | -------------------------------------------------------------------------------- /pandas/rpy/mass.py: -------------------------------------------------------------------------------- 1 | class rlm(object): 2 | pass 3 | -------------------------------------------------------------------------------- /ci/requirements-3.5_NUMPY_DEV.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | -------------------------------------------------------------------------------- /ci/requirements-3.5_ASCII.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | -------------------------------------------------------------------------------- /conda.recipe/bld.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | %PYTHON% setup.py install 3 | -------------------------------------------------------------------------------- /conda.recipe/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | $PYTHON setup.py install 3 | -------------------------------------------------------------------------------- /ci/appveyor.recipe/bld.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | %PYTHON% setup.py install 3 | -------------------------------------------------------------------------------- /ci/appveyor.recipe/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | $PYTHON setup.py install 3 | -------------------------------------------------------------------------------- /ci/requirements-3.5.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | cython 5 | -------------------------------------------------------------------------------- /ci/requirements-3.5_NUMPY_DEV.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | cython 4 | -------------------------------------------------------------------------------- /ci/requirements-3.6.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | cython 5 | -------------------------------------------------------------------------------- /test_fast.sh: -------------------------------------------------------------------------------- 1 | nosetests -A "not slow and not network" pandas --with-id $* 2 | -------------------------------------------------------------------------------- /ci/requirements-2.7_BUILD_TEST.build: -------------------------------------------------------------------------------- 1 | dateutil 2 | pytz 3 | numpy 4 | cython 5 | -------------------------------------------------------------------------------- /ci/requirements-3.4.build: -------------------------------------------------------------------------------- 1 | numpy=1.8.1 2 | cython=0.24.1 3 | libgfortran=1.0 4 | -------------------------------------------------------------------------------- /ci/requirements-3.5_ASCII.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | cython 5 | -------------------------------------------------------------------------------- /test_multi.sh: -------------------------------------------------------------------------------- 1 | nosetests -A "not slow and not network" pandas --processes=4 $* 2 | -------------------------------------------------------------------------------- /vb_suite/.gitignore: -------------------------------------------------------------------------------- 1 | benchmarks.db 2 | build/* 3 | source/vbench/* 4 | source/*.rst -------------------------------------------------------------------------------- /ci/requirements-2.7_SLOW.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy=1.8.2 4 | cython 5 | -------------------------------------------------------------------------------- /ci/requirements-3.4_SLOW.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy=1.9.3 4 | cython 5 | -------------------------------------------------------------------------------- /ci/requirements-3.5_DOC_BUILD.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | cython 5 | -------------------------------------------------------------------------------- /doc/data/fx_prices: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/data/fx_prices -------------------------------------------------------------------------------- /doc/data/test.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/data/test.xls -------------------------------------------------------------------------------- /ci/requirements-2.7.build: -------------------------------------------------------------------------------- 1 | python-dateutil=2.4.1 2 | pytz=2013b 3 | numpy 4 | cython=0.23 5 | -------------------------------------------------------------------------------- /ci/requirements_dev.txt: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | cython 5 | nose 6 | flake8 7 | -------------------------------------------------------------------------------- /pandas/io/tests/data/test_mmap.csv: -------------------------------------------------------------------------------- 1 | a,b,c 2 | 1,one,I 3 | 2,two,II 4 | 5 | 3,three,III 6 | -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/test_mmap.csv: -------------------------------------------------------------------------------- 1 | a,b,c 2 | 1,one,I 3 | 2,two,II 4 | 3,three,III 5 | -------------------------------------------------------------------------------- /ci/requirements-2.7_COMPAT.build: -------------------------------------------------------------------------------- 1 | numpy=1.7.1 2 | cython=0.23 3 | dateutil=1.5 4 | pytz=2013b 5 | -------------------------------------------------------------------------------- /ci/travis_gbq.json.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/ci/travis_gbq.json.enc -------------------------------------------------------------------------------- /ci/requirements-2.7_LOCALE.build: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz=2013b 3 | numpy=1.7.1 4 | cython=0.23 5 | -------------------------------------------------------------------------------- /doc/logo/pandas_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/logo/pandas_logo.png -------------------------------------------------------------------------------- /pandas/io/tests/data/blank.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/blank.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test1.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test1.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test2.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test2.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test3.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test3.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test4.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test4.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test5.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test5.xls -------------------------------------------------------------------------------- /test.bat: -------------------------------------------------------------------------------- 1 | :: test on windows 2 | 3 | nosetests --exe -A "not slow and not network and not disabled" pandas %* 4 | -------------------------------------------------------------------------------- /ci/requirements-3.4.pip: -------------------------------------------------------------------------------- 1 | python-dateutil==2.2 2 | blosc 3 | httplib2 4 | google-api-python-client 5 | oauth2client 6 | -------------------------------------------------------------------------------- /ci/travis_gbq_config.txt: -------------------------------------------------------------------------------- 1 | TRAVIS_IV_ENV=encrypted_1d9d7b1f171b_iv 2 | TRAVIS_KEY_ENV=encrypted_1d9d7b1f171b_key 3 | -------------------------------------------------------------------------------- /doc/source/_static/eval-perf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/eval-perf.png -------------------------------------------------------------------------------- /doc/source/_static/legacy_0.10.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/legacy_0.10.h5 -------------------------------------------------------------------------------- /doc/source/_static/query-perf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/query-perf.png -------------------------------------------------------------------------------- /pandas/io/tests/data/S4_EDUC1.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/S4_EDUC1.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/blank.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/blank.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/blank.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/blank.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/stata15.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata15.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/test1.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test1.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test1.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test1.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/test2.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test2.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test2.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test2.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/test3.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test3.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test3.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test3.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/test4.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test4.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test4.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test4.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/test5.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test5.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test5.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test5.xlsx -------------------------------------------------------------------------------- /pandas/lib.pxd: -------------------------------------------------------------------------------- 1 | # prototypes for sharing 2 | 3 | cdef bint is_null_datetimelike(v) 4 | cpdef bint is_period(val) 5 | -------------------------------------------------------------------------------- /vb_suite/generate_rst_files.py: -------------------------------------------------------------------------------- 1 | from suite import benchmarks, generate_rst_files 2 | generate_rst_files(benchmarks) 3 | -------------------------------------------------------------------------------- /doc/source/_static/trunc_after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/trunc_after.png -------------------------------------------------------------------------------- /doc/source/_static/trunc_before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/trunc_before.png -------------------------------------------------------------------------------- /pandas/core/index.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | from pandas.indexes.api import * 3 | from pandas.indexes.multi import _sparsify 4 | -------------------------------------------------------------------------------- /pandas/io/tests/data/stata1_114.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata1_114.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata1_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata1_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata2_113.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata2_113.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata2_114.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata2_114.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata2_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata2_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata2_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata2_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata3_113.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata3_113.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata3_114.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata3_114.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata3_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata3_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata3_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata3_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata4_113.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata4_113.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata4_114.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata4_114.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata4_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata4_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata4_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata4_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata5_113.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata5_113.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata5_114.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata5_114.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata5_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata5_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata5_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata5_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata6_113.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata6_113.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata6_114.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata6_114.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata6_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata6_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata6_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata6_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata7_111.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata7_111.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata7_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata7_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata7_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata7_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata8_113.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata8_113.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata8_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata8_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata8_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata8_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata9_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata9_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata9_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata9_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/test_types.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_types.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/testdtype.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testdtype.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/testdtype.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testdtype.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/testdtype.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testdtype.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/times_1900.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/times_1900.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/times_1904.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/times_1904.xls -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/DEMO_G.xpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/DEMO_G.xpt -------------------------------------------------------------------------------- /doc/cheatsheet/Pandas_Cheat_Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf -------------------------------------------------------------------------------- /doc/cheatsheet/Pandas_Cheat_Sheet.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/cheatsheet/Pandas_Cheat_Sheet.pptx -------------------------------------------------------------------------------- /doc/source/_static/eval-perf-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/eval-perf-small.png -------------------------------------------------------------------------------- /doc/source/_static/new-excel-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/new-excel-index.png -------------------------------------------------------------------------------- /doc/source/_static/old-excel-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/old-excel-index.png -------------------------------------------------------------------------------- /doc/source/_static/whatsnew_assign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/whatsnew_assign.png -------------------------------------------------------------------------------- /pandas/api/types/__init__.py: -------------------------------------------------------------------------------- 1 | """ public toolkit API """ 2 | 3 | from pandas.types.api import * # noqa 4 | del np # noqa 5 | -------------------------------------------------------------------------------- /pandas/io/tests/data/stata10_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata10_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata10_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata10_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata11_115.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata11_115.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata11_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata11_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata12_117.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata12_117.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/stata14_118.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata14_118.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/test_squeeze.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_squeeze.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test_squeeze.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_squeeze.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test_squeeze.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_squeeze.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/test_types.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_types.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test_types.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_types.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/testskiprows.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testskiprows.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/testskiprows.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testskiprows.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/testskiprows.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testskiprows.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/times_1900.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/times_1900.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/times_1900.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/times_1900.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/times_1904.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/times_1904.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/times_1904.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/times_1904.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/DRXFCD_G.xpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/DRXFCD_G.xpt -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/SSHSV1_A.xpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/SSHSV1_A.xpt -------------------------------------------------------------------------------- /pandas/tseries/tests/data/frame.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tseries/tests/data/frame.pickle -------------------------------------------------------------------------------- /doc/source/_static/df_repr_truncated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/df_repr_truncated.png -------------------------------------------------------------------------------- /doc/source/_static/option_unicode01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/option_unicode01.png -------------------------------------------------------------------------------- /doc/source/_static/option_unicode02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/option_unicode02.png -------------------------------------------------------------------------------- /doc/source/_static/option_unicode03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/option_unicode03.png -------------------------------------------------------------------------------- /doc/source/_static/option_unicode04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/option_unicode04.png -------------------------------------------------------------------------------- /doc/source/_static/query-perf-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/query-perf-small.png -------------------------------------------------------------------------------- /pandas/io/tests/data/stata1_encoding.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/stata1_encoding.dta -------------------------------------------------------------------------------- /pandas/io/tests/data/test_converters.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_converters.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test_multisheet.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_multisheet.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/testmultiindex.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testmultiindex.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/testmultiindex.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testmultiindex.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/testmultiindex.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testmultiindex.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/test1.csv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/test1.csv.gz -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/utf16_ex.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/utf16_ex.txt -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test1.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test1.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test10.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test10.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test11.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test11.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test12.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test12.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test13.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test13.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test14.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test14.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test15.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test15.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test16.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test16.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test2.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test2.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test3.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test3.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test4.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test4.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test5.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test5.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test6.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test6.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test7.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test7.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test8.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test8.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test9.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test9.sas7bdat -------------------------------------------------------------------------------- /pandas/tseries/tests/data/series.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tseries/tests/data/series.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/blank_with_header.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/blank_with_header.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/blank_with_header.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/blank_with_header.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/blank_with_header.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/blank_with_header.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_hdf/legacy.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_hdf/legacy.h5 -------------------------------------------------------------------------------- /pandas/io/tests/data/test_converters.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_converters.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test_converters.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_converters.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/test_multisheet.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_multisheet.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test_multisheet.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_multisheet.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/data/testdateoverflow.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testdateoverflow.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/testdateoverflow.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testdateoverflow.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/testdateoverflow.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/testdateoverflow.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/salaries.csv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/salaries.csv.gz -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/salaries.csv.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/salaries.csv.xz -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/test1.csv.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/test1.csv.bz2 -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/airline.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/airline.sas7bdat -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/paxraw_d_short.xpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/paxraw_d_short.xpt -------------------------------------------------------------------------------- /pandas/tests/indexes/data/mindex_073.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tests/indexes/data/mindex_073.pickle -------------------------------------------------------------------------------- /pandas/tests/indexes/data/s1-0.12.0.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tests/indexes/data/s1-0.12.0.pickle -------------------------------------------------------------------------------- /pandas/tests/indexes/data/s2-0.12.0.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tests/indexes/data/s2-0.12.0.pickle -------------------------------------------------------------------------------- /test_perf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CURDIR=$(pwd) 4 | BASEDIR=$(cd "$(dirname "$0")"; pwd) 5 | python "$BASEDIR"/vb_suite/test_perf.py $@ 6 | -------------------------------------------------------------------------------- /doc/sphinxext/numpydoc/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function 2 | 3 | from .numpydoc import setup 4 | -------------------------------------------------------------------------------- /pandas/computation/api.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | from pandas.computation.eval import eval 4 | from pandas.computation.expr import Expr 5 | -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/salaries.csv.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/salaries.csv.bz2 -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/salaries.csv.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/salaries.csv.zip -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/test_12659.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/test_12659.sas7bdat -------------------------------------------------------------------------------- /pandas/tests/formats/data/unicode_series.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tests/formats/data/unicode_series.csv -------------------------------------------------------------------------------- /pandas/tseries/tests/data/cday-0.14.1.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tseries/tests/data/cday-0.14.1.pickle -------------------------------------------------------------------------------- /scripts/count_code.sh: -------------------------------------------------------------------------------- 1 | cloc pandas --force-lang=Python,pyx --not-match-f="parser.c|lib.c|tslib.c|sandbox.c|hashtable.c|sparse.c|algos.c|index.c" -------------------------------------------------------------------------------- /scripts/runtests.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | import os 3 | print(os.getpid()) 4 | import nose 5 | nose.main('pandas.core') 6 | -------------------------------------------------------------------------------- /scripts/winbuild_py27.bat: -------------------------------------------------------------------------------- 1 | SET PATH=C:\MinGW\bin;C:\Python27;C:\Python27\Scripts;%PATH% 2 | python setup.py build -c mingw32 bdist_wininst 3 | -------------------------------------------------------------------------------- /vb_suite/source/themes/agogo/static/bgtop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/vb_suite/source/themes/agogo/static/bgtop.png -------------------------------------------------------------------------------- /doc/source/_static/whatsnew_plot_submethods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/doc/source/_static/whatsnew_plot_submethods.png -------------------------------------------------------------------------------- /pandas/io/tests/data/categorical_0_15_2.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/categorical_0_15_2.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_hdf/legacy_0.10.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_hdf/legacy_0.10.h5 -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_hdf/legacy_table.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_hdf/legacy_table.h5 -------------------------------------------------------------------------------- /pandas/io/tests/data/test_index_name_pre17.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_index_name_pre17.xls -------------------------------------------------------------------------------- /pandas/io/tests/data/test_index_name_pre17.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_index_name_pre17.xlsm -------------------------------------------------------------------------------- /pandas/io/tests/data/test_index_name_pre17.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/test_index_name_pre17.xlsx -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/sauron.SHIFT_JIS.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/sauron.SHIFT_JIS.csv -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/unicode_series.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/parser/data/unicode_series.csv -------------------------------------------------------------------------------- /pandas/io/tests/sas/data/productsales.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/sas/data/productsales.sas7bdat -------------------------------------------------------------------------------- /pandas/tseries/tests/data/daterange_073.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tseries/tests/data/daterange_073.pickle -------------------------------------------------------------------------------- /vb_suite/source/themes/agogo/static/bgfooter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/vb_suite/source/themes/agogo/static/bgfooter.png -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_hdf/pytables_native.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_hdf/pytables_native.h5 -------------------------------------------------------------------------------- /pandas/src/klib/ktypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __KTYPES_H 2 | #define __KTYPES_H 3 | 4 | /* compipler specific configuration */ 5 | 6 | #endif /* __KTYPES_H */ 7 | -------------------------------------------------------------------------------- /pandas/tseries/tests/data/series_daterange0.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/tseries/tests/data/series_daterange0.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/html_encoding/letz_latin1.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/html_encoding/letz_latin1.html -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_hdf/datetimetz_object.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_hdf/datetimetz_object.h5 -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_hdf/legacy_table_0.11.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_hdf/legacy_table_0.11.h5 -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_hdf/pytables_native2.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_hdf/pytables_native2.h5 -------------------------------------------------------------------------------- /ci/requirements-2.7.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate pandas 4 | 5 | echo "install 27" 6 | 7 | conda install -n pandas -c conda-forge feather-format 8 | -------------------------------------------------------------------------------- /ci/requirements-3.5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate pandas 4 | 5 | echo "install 35" 6 | 7 | conda install -n pandas -c conda-forge feather-format 8 | -------------------------------------------------------------------------------- /ci/requirements-3.6.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate pandas 4 | 5 | echo "install 36" 6 | 7 | conda install -n pandas -c conda-forge feather-format 8 | -------------------------------------------------------------------------------- /pandas/io/tests/data/html_encoding/chinese_utf-16.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/html_encoding/chinese_utf-16.html -------------------------------------------------------------------------------- /pandas/io/tests/data/html_encoding/chinese_utf-32.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/html_encoding/chinese_utf-32.html -------------------------------------------------------------------------------- /ci/requirements-3.5_OSX.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate pandas 4 | 5 | echo "install 35_OSX" 6 | 7 | conda install -n pandas -c conda-forge feather-format 8 | -------------------------------------------------------------------------------- /scripts/windows_builder/check_and_build.bat: -------------------------------------------------------------------------------- 1 | set PYTHONPATH=c:/python27-64/lib 2 | c:/python27-64/python.exe c:/Builds/check_and_build.py %1 %2 %3 %4 %4 %6 %7 %8 %9 3 | -------------------------------------------------------------------------------- /doc/source/style.rst: -------------------------------------------------------------------------------- 1 | .. _style: 2 | 3 | .. currentmodule:: pandas 4 | 5 | ***** 6 | Style 7 | ***** 8 | 9 | .. raw:: html 10 | :file: html-styling.html 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | - [ ] closes #xxxx 2 | - [ ] tests added / passed 3 | - [ ] passes ``git diff upstream/master | flake8 --diff`` 4 | - [ ] whatsnew entry 5 | -------------------------------------------------------------------------------- /ci/requirements-3.5_DOC_BUILD.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate pandas 4 | 5 | echo "install DOC_BUILD" 6 | 7 | conda install -n pandas -c conda-forge feather-format 8 | -------------------------------------------------------------------------------- /doc/_templates/autosummary/class_without_autosummary.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | 6 | .. autoclass:: {{ objname }} 7 | -------------------------------------------------------------------------------- /doc/source/themes/nature_with_gtoc/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = nature.css 4 | pygments_style = tango 5 | 6 | [options] 7 | sidebarwidth = 270 8 | -------------------------------------------------------------------------------- /ci/requirements-2.7.pip: -------------------------------------------------------------------------------- 1 | blosc 2 | httplib2 3 | google-api-python-client==1.2 4 | python-gflags==2.0 5 | oauth2client==1.5.0 6 | pathlib 7 | backports.lzma 8 | py 9 | PyCrypto 10 | -------------------------------------------------------------------------------- /doc/sphinxext/numpydoc/tests/test_linkcode.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function 2 | 3 | import numpydoc.linkcode 4 | 5 | # No tests at the moment... 6 | -------------------------------------------------------------------------------- /doc/sphinxext/numpydoc/tests/test_traitsdoc.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function 2 | 3 | import numpydoc.traitsdoc 4 | 5 | # No tests at the moment... 6 | -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.10.1/AMD64_windows_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.10.1/AMD64_windows_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.10.1/x86_64_linux_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.10.1/x86_64_linux_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_3.3.0.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.11.0/x86_64_linux_3.3.0.pickle -------------------------------------------------------------------------------- /ci/requirements-3.4_SLOW.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate pandas 4 | 5 | echo "install 34_slow" 6 | 7 | conda install -n pandas -c conda-forge/label/rc -c conda-forge matplotlib 8 | -------------------------------------------------------------------------------- /scripts/test_py27.bat: -------------------------------------------------------------------------------- 1 | SET PATH=C:\MinGW\bin;C:\Python27;C:\Python27\Scripts;%PATH% 2 | 3 | python setup.py clean 4 | python setup.py build_ext -c mingw32 --inplace 5 | 6 | nosetests pandas -------------------------------------------------------------------------------- /ci/requirements-3.4-64.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy=1.9* 4 | openpyxl 5 | xlsxwriter 6 | xlrd 7 | xlwt 8 | scipy 9 | numexpr 10 | pytables 11 | bottleneck 12 | jinja2=2.8 13 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: '82' 6 | patch: 7 | default: 8 | target: '50' 9 | branches: null 10 | -------------------------------------------------------------------------------- /doc/sphinxext/numpydoc/tests/test_phantom_import.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function 2 | 3 | import numpydoc.phantom_import 4 | 5 | # No tests at the moment... 6 | -------------------------------------------------------------------------------- /doc/sphinxext/numpydoc/tests/test_plot_directive.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function 2 | 3 | import numpydoc.plot_directive 4 | 5 | # No tests at the moment... 6 | -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_i686_linux_2.6.5.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_i686_linux_2.6.5.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_i686_linux_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_i686_linux_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_i686_linux_3.2.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_i686_linux_3.2.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.11.0/0.11.0_x86_64_linux_3.3.0.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.11.0/0.11.0_x86_64_linux_3.3.0.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.12.0/0.12.0_AMD64_windows_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.12.0/0.12.0_AMD64_windows_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.12.0/0.12.0_x86_64_linux_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.12.0/0.12.0_x86_64_linux_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_AMD64_windows_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_AMD64_windows_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_darwin_2.7.5.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_darwin_2.7.5.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_darwin_2.7.6.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_darwin_2.7.6.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_linux_2.7.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_linux_2.7.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_linux_2.7.8.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_linux_2.7.8.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_linux_3.3.0.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.13.0/0.13.0_x86_64_linux_3.3.0.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.14.0/0.14.0_x86_64_darwin_2.7.6.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.14.0/0.14.0_x86_64_darwin_2.7.6.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.14.0/0.14.0_x86_64_linux_2.7.8.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.14.0/0.14.0_x86_64_linux_2.7.8.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.14.1/0.14.1_x86_64_linux_2.7.8.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.14.1/0.14.1_x86_64_linux_2.7.8.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.15.0/0.15.0_x86_64_linux_2.7.8.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.15.0/0.15.0_x86_64_linux_2.7.8.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.15.2/0.15.2_x86_64_darwin_2.7.9.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.15.2/0.15.2_x86_64_darwin_2.7.9.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.0/0.16.0_x86_64_darwin_2.7.9.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.0/0.16.0_x86_64_darwin_2.7.9.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_AMD64_windows_3.4.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_AMD64_windows_3.4.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_darwin_2.7.9.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_darwin_2.7.9.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_darwin_3.4.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_darwin_3.4.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_linux_2.7.10.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_linux_2.7.10.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_linux_3.4.3.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_linux_3.4.3.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_AMD64_windows_3.4.4.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_AMD64_windows_3.4.4.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_darwin_3.4.4.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_darwin_3.4.4.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_linux_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_linux_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_linux_3.4.4.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_linux_3.4.4.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_AMD64_windows_3.5.1.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_AMD64_windows_3.5.1.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_x86_64_darwin_3.5.1.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_x86_64_darwin_3.5.1.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.18.1/0.18.1_x86_64_darwin_3.5.2.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.18.1/0.18.1_x86_64_darwin_3.5.2.pickle -------------------------------------------------------------------------------- /pandas/src/headers/portable.h: -------------------------------------------------------------------------------- 1 | #ifndef _PANDAS_PORTABLE_H_ 2 | #define _PANDAS_PORTABLE_H_ 3 | 4 | #if defined(_MSC_VER) 5 | #define strcasecmp( s1, s2 ) _stricmp( s1, s2 ) 6 | #endif 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /ci/requirements-3.5-64.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | openpyxl 5 | xlsxwriter 6 | xlrd 7 | xlwt 8 | scipy 9 | feather-format 10 | numexpr 11 | pytables 12 | matplotlib 13 | blosc 14 | -------------------------------------------------------------------------------- /ci/requirements-3.6-64.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | openpyxl 5 | xlsxwriter 6 | xlrd 7 | #xlwt 8 | scipy 9 | feather-format 10 | numexpr 11 | pytables 12 | matplotlib 13 | blosc 14 | -------------------------------------------------------------------------------- /ci/run_build_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "inside $0" 4 | 5 | "$TRAVIS_BUILD_DIR"/ci/build_docs.sh 2>&1 6 | 7 | # wait until subprocesses finish (build_docs.sh) 8 | wait 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /doc/cheatsheet/README.txt: -------------------------------------------------------------------------------- 1 | The Pandas Cheat Sheet was created using Microsoft Powerpoint 2013. 2 | To create the PDF version, within Powerpoint, simply do a "Save As" 3 | and pick "PDF' as the format. 4 | 5 | -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.0/0.16.0_x86_64_darwin_2.7.9.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.0/0.16.0_x86_64_darwin_2.7.9.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_AMD64_windows_2.7.10.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_AMD64_windows_2.7.10.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_AMD64_windows_3.4.3.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_AMD64_windows_3.4.3.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_darwin_2.7.10.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_darwin_2.7.10.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_darwin_2.7.9.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_darwin_2.7.9.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_darwin_3.4.3.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_darwin_3.4.3.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_linux_2.7.10.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_linux_2.7.10.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_linux_3.4.3.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.16.2/0.16.2_x86_64_linux_3.4.3.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_AMD64_windows_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_AMD64_windows_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_AMD64_windows_3.4.4.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_AMD64_windows_3.4.4.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_darwin_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_darwin_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_darwin_3.4.4.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_darwin_3.4.4.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_linux_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_linux_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_linux_3.4.4.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.0_x86_64_linux_3.4.4.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.1_AMD64_windows_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.1_AMD64_windows_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.1_AMD64_windows_3.5.1.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.0/0.17.1_AMD64_windows_3.5.1.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_AMD64_windows_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_AMD64_windows_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_AMD64_windows_3.5.1.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_AMD64_windows_3.5.1.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_darwin_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_darwin_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_darwin_3.5.1.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_darwin_3.5.1.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_linux_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_linux_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_linux_3.4.4.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.17.1/0.17.1_x86_64_linux_3.4.4.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_AMD64_windows_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_AMD64_windows_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_AMD64_windows_3.5.1.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_AMD64_windows_3.5.1.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_x86_64_darwin_2.7.11.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_x86_64_darwin_2.7.11.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_x86_64_darwin_3.5.1.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.18.0/0.18.0_x86_64_darwin_3.5.1.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.18.1/0.18.1_x86_64_darwin_2.7.12.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.18.1/0.18.1_x86_64_darwin_2.7.12.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_msgpack/0.18.1/0.18.1_x86_64_darwin_3.5.2.msgpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_msgpack/0.18.1/0.18.1_x86_64_darwin_3.5.2.msgpack -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.14.1/0.14.1_x86_64_darwin_2.7.12.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.14.1/0.14.1_x86_64_darwin_2.7.12.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.15.0/0.15.0_x86_64_darwin_2.7.12.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.15.0/0.15.0_x86_64_darwin_2.7.12.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_AMD64_windows_2.7.10.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_AMD64_windows_2.7.10.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_darwin_2.7.10.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.16.2/0.16.2_x86_64_darwin_2.7.10.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_AMD64_windows_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_AMD64_windows_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_darwin_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.0/0.17.0_x86_64_darwin_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.0/0.17.1_AMD64_windows_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.0/0.17.1_AMD64_windows_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.1/0.17.1_AMD64_windows_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.1/0.17.1_AMD64_windows_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.17.1/0.17.1_x86_64_darwin_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.17.1/0.17.1_x86_64_darwin_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_AMD64_windows_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_AMD64_windows_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_x86_64_darwin_2.7.11.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.18.0/0.18.0_x86_64_darwin_2.7.11.pickle -------------------------------------------------------------------------------- /pandas/io/tests/data/legacy_pickle/0.18.1/0.18.1_x86_64_darwin_2.7.12.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sandbox/pandas/master/pandas/io/tests/data/legacy_pickle/0.18.1/0.18.1_x86_64_darwin_2.7.12.pickle -------------------------------------------------------------------------------- /doc/_templates/autosummary/accessor.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module.split('.')[0] }} 5 | 6 | .. autoaccessor:: {{ (module.split('.')[1:] + [objname]) | join('.') }} 7 | -------------------------------------------------------------------------------- /doc/_templates/autosummary/accessor_method.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module.split('.')[0] }} 5 | 6 | .. autoaccessormethod:: {{ (module.split('.')[1:] + [objname]) | join('.') }} 7 | -------------------------------------------------------------------------------- /doc/_templates/autosummary/accessor_attribute.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module.split('.')[0] }} 5 | 6 | .. autoaccessorattribute:: {{ (module.split('.')[1:] + [objname]) | join('.') }} 7 | -------------------------------------------------------------------------------- /pandas/src/headers/stdint.h: -------------------------------------------------------------------------------- 1 | #ifndef _PANDAS_STDINT_H_ 2 | #define _PANDAS_STDINT_H_ 3 | 4 | #if defined(_MSC_VER) && (_MSC_VER < 1900) 5 | #include "ms_stdint.h" 6 | #else 7 | #include 8 | #endif 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /ci/requirements-3.5_OSX.run: -------------------------------------------------------------------------------- 1 | pytz 2 | numpy=1.10.4 3 | openpyxl 4 | xlsxwriter 5 | xlrd 6 | xlwt 7 | numexpr 8 | pytables 9 | html5lib 10 | lxml 11 | matplotlib 12 | jinja2 13 | bottleneck 14 | xarray 15 | s3fs 16 | beautifulsoup4 17 | -------------------------------------------------------------------------------- /doc/_templates/autosummary/accessor_callable.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module.split('.')[0] }} 5 | 6 | .. autoaccessorcallable:: {{ (module.split('.')[1:] + [objname]) | join('.') }}.__call__ 7 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | Release Notes 2 | ============= 3 | 4 | The list of changes to pandas between each release can be found 5 | [here](http://pandas.pydata.org/pandas-docs/stable/whatsnew.html). For full 6 | details, see the commit logs at http://github.com/pandas-dev/pandas. 7 | -------------------------------------------------------------------------------- /ci/requirements-3.4.run: -------------------------------------------------------------------------------- 1 | pytz=2015.7 2 | numpy=1.8.1 3 | openpyxl 4 | xlsxwriter 5 | xlrd 6 | xlwt 7 | html5lib 8 | patsy 9 | beautiful-soup 10 | scipy 11 | numexpr 12 | pytables 13 | lxml 14 | sqlalchemy 15 | bottleneck 16 | pymysql=0.6.3 17 | psycopg2 18 | jinja2=2.8 19 | -------------------------------------------------------------------------------- /pandas/sparse/api.py: -------------------------------------------------------------------------------- 1 | # pylint: disable=W0611 2 | # flake8: noqa 3 | from pandas.sparse.array import SparseArray 4 | from pandas.sparse.list import SparseList 5 | from pandas.sparse.series import SparseSeries, SparseTimeSeries 6 | from pandas.sparse.frame import SparseDataFrame 7 | -------------------------------------------------------------------------------- /ci/requirements-2.7-64.run: -------------------------------------------------------------------------------- 1 | dateutil 2 | pytz 3 | numpy=1.10* 4 | xlwt 5 | numexpr 6 | pytables==3.2.2 7 | matplotlib 8 | openpyxl 9 | xlrd 10 | sqlalchemy 11 | lxml=3.2.1 12 | scipy 13 | xlsxwriter 14 | s3fs 15 | bottleneck 16 | html5lib 17 | beautiful-soup 18 | jinja2=2.8 19 | -------------------------------------------------------------------------------- /pandas/src/headers/math.h: -------------------------------------------------------------------------------- 1 | #ifndef _PANDAS_MATH_H_ 2 | #define _PANDAS_MATH_H_ 3 | 4 | #if defined(_MSC_VER) && (_MSC_VER < 1800) 5 | #include 6 | __inline int signbit(double num) { return _copysign(1.0, num) < 0; } 7 | #else 8 | #include 9 | #endif 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /ci/requirements-3.5.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | openpyxl 5 | xlsxwriter 6 | xlrd 7 | xlwt 8 | scipy 9 | numexpr 10 | pytables 11 | html5lib 12 | lxml 13 | matplotlib 14 | jinja2 15 | bottleneck 16 | sqlalchemy 17 | pymysql 18 | psycopg2 19 | xarray 20 | s3fs 21 | beautifulsoup4 22 | -------------------------------------------------------------------------------- /pandas/rpy/base.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | import pandas.rpy.util as util 4 | 5 | 6 | class lm(object): 7 | """ 8 | Examples 9 | -------- 10 | >>> model = lm('x ~ y + z', data) 11 | >>> model.coef 12 | """ 13 | def __init__(self, formula, data): 14 | pass 15 | -------------------------------------------------------------------------------- /pandas/stats/api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Common namespace of statistical functions 3 | """ 4 | 5 | # pylint: disable-msg=W0611,W0614,W0401 6 | 7 | # flake8: noqa 8 | 9 | from pandas.stats.moments import * 10 | from pandas.stats.interface import ols 11 | from pandas.stats.fama_macbeth import fama_macbeth 12 | -------------------------------------------------------------------------------- /pandas/core/sparse.py: -------------------------------------------------------------------------------- 1 | """ 2 | Data structures for sparse float data. Life is made simpler by dealing only 3 | with float64 data 4 | """ 5 | 6 | # pylint: disable=W0611 7 | # flake8: noqa 8 | 9 | from pandas.sparse.series import SparseSeries 10 | from pandas.sparse.frame import SparseDataFrame 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | # enforce text on certain files 3 | *.py text 4 | *.pyx text 5 | *.pyd text 6 | *.c text 7 | *.h text 8 | *.html text 9 | *.csv text 10 | *.json text 11 | *.pickle binary 12 | *.h5 binary 13 | *.dta binary 14 | *.xls binary 15 | *.xlsx binary 16 | pandas/_version.py export-subst 17 | -------------------------------------------------------------------------------- /ci/requirements-2.7_SLOW.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy=1.8.2 4 | matplotlib=1.3.1 5 | scipy 6 | patsy 7 | statsmodels 8 | xlwt 9 | openpyxl 10 | xlsxwriter 11 | xlrd 12 | numexpr 13 | pytables 14 | sqlalchemy 15 | lxml 16 | s3fs 17 | bottleneck 18 | psycopg2 19 | pymysql 20 | html5lib 21 | beautiful-soup 22 | -------------------------------------------------------------------------------- /ci/install_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "${TRAVIS_OS_NAME}" != "linux" ]; then 4 | echo "not using dbs on non-linux" 5 | exit 0 6 | fi 7 | 8 | echo "installing dbs" 9 | mysql -e 'create database pandas_nosetest;' 10 | psql -c 'create database pandas_nosetest;' -U postgres 11 | 12 | echo "done" 13 | exit 0 14 | -------------------------------------------------------------------------------- /scripts/leak.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | from pandas.compat import range 3 | import numpy as np 4 | import pandas.util.testing as tm 5 | import os 6 | import psutil 7 | 8 | pid = os.getpid() 9 | proc = psutil.Process(pid) 10 | 11 | df = DataFrame(index=np.arange(100)) 12 | for i in range(5000): 13 | df[i] = 5 14 | -------------------------------------------------------------------------------- /ci/requirements-3.4_SLOW.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy=1.9.3 4 | openpyxl 5 | xlsxwriter 6 | xlrd 7 | xlwt 8 | html5lib 9 | patsy 10 | beautiful-soup 11 | scipy 12 | numexpr=2.4.4 13 | pytables 14 | matplotlib 15 | lxml 16 | sqlalchemy 17 | bottleneck 18 | pymysql 19 | psycopg2 20 | statsmodels 21 | jinja2=2.8 22 | -------------------------------------------------------------------------------- /ci/requirements-3.5_DOC_BUILD.run: -------------------------------------------------------------------------------- 1 | ipython 2 | ipykernel 3 | sphinx 4 | nbconvert 5 | nbformat 6 | notebook 7 | matplotlib 8 | scipy 9 | lxml 10 | beautifulsoup4 11 | html5lib 12 | pytables 13 | openpyxl=1.8.5 14 | xlrd 15 | xlwt 16 | xlsxwriter 17 | sqlalchemy 18 | numexpr 19 | bottleneck 20 | statsmodels 21 | pyqt=4.11.4 22 | -------------------------------------------------------------------------------- /ci/requirements_all.txt: -------------------------------------------------------------------------------- 1 | nose 2 | flake8 3 | sphinx 4 | ipython 5 | python-dateutil 6 | pytz 7 | openpyxl 8 | xlsxwriter 9 | xlrd 10 | xlwt 11 | html5lib 12 | patsy 13 | beautiful-soup 14 | numpy 15 | cython 16 | scipy 17 | numexpr 18 | pytables 19 | matplotlib 20 | lxml 21 | sqlalchemy 22 | bottleneck 23 | pymysql 24 | Jinja2 25 | -------------------------------------------------------------------------------- /scripts/faster_xs.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | import pandas.util.testing as tm 4 | 5 | from pandas.core.internals import _interleaved_dtype 6 | 7 | df = tm.makeDataFrame() 8 | 9 | df['E'] = 'foo' 10 | df['F'] = 'foo' 11 | df['G'] = 2 12 | df['H'] = df['A'] > 0 13 | 14 | blocks = df._data.blocks 15 | items = df.columns 16 | -------------------------------------------------------------------------------- /ci/requirements-2.7_COMPAT.run: -------------------------------------------------------------------------------- 1 | numpy=1.7.1 2 | dateutil=1.5 3 | pytz=2013b 4 | scipy=0.11.0 5 | xlwt=0.7.5 6 | xlrd=0.9.2 7 | statsmodels=0.4.3 8 | bottleneck=0.8.0 9 | numexpr=2.2.2 10 | pytables=3.0.0 11 | html5lib=1.0b2 12 | beautiful-soup=4.2.0 13 | psycopg2=2.5.1 14 | pymysql=0.6.0 15 | sqlalchemy=0.7.8 16 | xlsxwriter=0.4.6 17 | jinja2=2.8 18 | -------------------------------------------------------------------------------- /doc/data/mindex_ex.csv: -------------------------------------------------------------------------------- 1 | year,indiv,zit,xit 2 | 1977,"A",1.2,.6 3 | 1977,"B",1.5,.5 4 | 1977,"C",1.7,.8 5 | 1978,"A",.2,.06 6 | 1978,"B",.7,.2 7 | 1978,"C",.8,.3 8 | 1978,"D",.9,.5 9 | 1978,"E",1.4,.9 10 | 1979,"C",.2,.15 11 | 1979,"D",.14,.05 12 | 1979,"E",.5,.15 13 | 1979,"F",1.2,.5 14 | 1979,"G",3.4,1.9 15 | 1979,"H",5.4,2.7 16 | 1979,"I",6.4,1.2 17 | -------------------------------------------------------------------------------- /ci/requirements-2.7_LOCALE.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz=2013b 3 | numpy=1.7.1 4 | xlwt=0.7.5 5 | openpyxl=1.6.2 6 | xlsxwriter=0.4.6 7 | xlrd=0.9.2 8 | bottleneck=0.8.0 9 | matplotlib=1.2.1 10 | patsy=0.1.0 11 | sqlalchemy=0.8.1 12 | html5lib=1.0b2 13 | lxml=3.2.1 14 | scipy=0.11.0 15 | beautiful-soup=4.2.1 16 | statsmodels=0.4.3 17 | bigquery=2.0.17 18 | -------------------------------------------------------------------------------- /ci/requirements-3.6.run: -------------------------------------------------------------------------------- 1 | python-dateutil 2 | pytz 3 | numpy 4 | scipy 5 | openpyxl 6 | xlsxwriter 7 | xlrd 8 | # xlwt (installed via pip) 9 | numexpr 10 | pytables 11 | # matplotlib (not avail on defaults ATM) 12 | lxml 13 | html5lib 14 | jinja2 15 | sqlalchemy 16 | pymysql 17 | # psycopg2 (not avail on defaults ATM) 18 | beautifulsoup4 19 | s3fs 20 | xarray 21 | -------------------------------------------------------------------------------- /pandas/io/wb.py: -------------------------------------------------------------------------------- 1 | raise ImportError( 2 | "The pandas.io.wb module is moved to a separate package " 3 | "(pandas-datareader). After installing the pandas-datareader package " 4 | "(https://github.com/pydata/pandas-datareader), you can change " 5 | "the import ``from pandas.io import data, wb`` to " 6 | "``from pandas_datareader import data, wb``.") 7 | -------------------------------------------------------------------------------- /pandas/io/data.py: -------------------------------------------------------------------------------- 1 | raise ImportError( 2 | "The pandas.io.data module is moved to a separate package " 3 | "(pandas-datareader). After installing the pandas-datareader package " 4 | "(https://github.com/pydata/pandas-datareader), you can change " 5 | "the import ``from pandas.io import data, wb`` to " 6 | "``from pandas_datareader import data, wb``.") 7 | -------------------------------------------------------------------------------- /pandas/io/tests/sas/test_sas.py: -------------------------------------------------------------------------------- 1 | import pandas.util.testing as tm 2 | from pandas.compat import StringIO 3 | from pandas import read_sas 4 | 5 | 6 | class TestSas(tm.TestCase): 7 | 8 | def test_sas_buffer_format(self): 9 | 10 | # GH14947 11 | b = StringIO("") 12 | with self.assertRaises(ValueError): 13 | read_sas(b) 14 | -------------------------------------------------------------------------------- /pandas/util/clipboard/exceptions.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | import ctypes 3 | 4 | 5 | class PyperclipException(RuntimeError): 6 | pass 7 | 8 | 9 | class PyperclipWindowsException(PyperclipException): 10 | def __init__(self, message): 11 | message += " (%s)" % ctypes.WinError() 12 | super(PyperclipWindowsException, self).__init__(message) 13 | -------------------------------------------------------------------------------- /pandas/tslib.pxd: -------------------------------------------------------------------------------- 1 | from numpy cimport ndarray, int64_t 2 | 3 | cdef convert_to_tsobject(object, object, object, bint, bint) 4 | cpdef convert_to_timedelta64(object, object) 5 | cpdef object maybe_get_tz(object) 6 | cdef bint _is_utc(object) 7 | cdef bint _is_tzlocal(object) 8 | cdef object _get_dst_info(object) 9 | cdef bint _nat_scalar_rules[6] 10 | cdef bint _check_all_nulls(obj) 11 | -------------------------------------------------------------------------------- /ci/requirements-2.7.run: -------------------------------------------------------------------------------- 1 | python-dateutil=2.4.1 2 | pytz=2013b 3 | numpy 4 | xlwt=0.7.5 5 | numexpr 6 | pytables 7 | matplotlib 8 | openpyxl=1.6.2 9 | xlrd=0.9.2 10 | sqlalchemy=0.9.6 11 | lxml=3.2.1 12 | scipy 13 | xlsxwriter=0.4.6 14 | s3fs 15 | bottleneck 16 | psycopg2=2.5.2 17 | patsy 18 | pymysql=0.6.3 19 | html5lib=1.0b2 20 | beautiful-soup=4.2.1 21 | statsmodels 22 | jinja2=2.8 23 | xarray 24 | -------------------------------------------------------------------------------- /scripts/boxplot_test.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | 3 | import random 4 | import pandas.util.testing as tm 5 | tm.N = 1000 6 | df = tm.makeTimeDataFrame() 7 | import string 8 | foo = list(string.letters[:5]) * 200 9 | df['indic'] = list(string.letters[:5]) * 200 10 | random.shuffle(foo) 11 | df['indic2'] = foo 12 | df.boxplot(by=['indic', 'indic2'], fontsize=8, rot=90) 13 | 14 | plt.show() 15 | -------------------------------------------------------------------------------- /doc/plots/stats/moments_ewma.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import pandas.util.testing as t 3 | import pandas.stats.moments as m 4 | 5 | t.N = 200 6 | s = t.makeTimeSeries().cumsum() 7 | 8 | plt.figure(figsize=(10, 5)) 9 | plt.plot(s.index, s.values) 10 | plt.plot(s.index, m.ewma(s, 20, min_periods=1).values) 11 | f = plt.gcf() 12 | f.autofmt_xdate() 13 | 14 | plt.show() 15 | plt.close('all') 16 | -------------------------------------------------------------------------------- /bench/bench_dense_to_sparse.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | 3 | K = 100 4 | N = 100000 5 | rng = DatetimeIndex('1/1/2000', periods=N, offset=datetools.Minute()) 6 | 7 | rng2 = np.asarray(rng).astype('M8[us]').astype('i8') 8 | 9 | series = {} 10 | for i in range(1, K + 1): 11 | data = np.random.randn(N)[:-i] 12 | this_rng = rng2[:-i] 13 | data[100:] = np.nan 14 | series[i] = SparseSeries(data, index=this_rng) 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Code Sample, a copy-pastable example if possible 2 | 3 | ```python 4 | # Your code here 5 | 6 | ``` 7 | #### Problem description 8 | 9 | [this should explain **why** the current behaviour is a problem and why the expected output is a better solution.] 10 | 11 | #### Expected Output 12 | 13 | #### Output of ``pd.show_versions()`` 14 | 15 |
16 | # Paste the output here pd.show_versions() here 17 | 18 |
19 | -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/test2.csv: -------------------------------------------------------------------------------- 1 | A,B,C,D,E 2 | 2000-01-03 00:00:00,0.980268513777,3.68573087906,-0.364216805298,-1.15973806169,foo 3 | 2000-01-04 00:00:00,1.04791624281,-0.0412318367011,-0.16181208307,0.212549316967,bar 4 | 2000-01-05 00:00:00,0.498580885705,0.731167677815,-0.537677223318,1.34627041952,baz 5 | 2000-01-06 00:00:00,1.12020151869,1.56762092543,0.00364077397681,0.67525259227,qux 6 | 2000-01-07 00:00:00,-0.487094399463,0.571454623474,-1.6116394093,0.103468562917,foo2 7 | -------------------------------------------------------------------------------- /ci/travis_process_gbq_encryption.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ci/travis_gbq_config.txt 4 | 5 | if [[ -n ${SERVICE_ACCOUNT_KEY} ]]; then 6 | echo "${SERVICE_ACCOUNT_KEY}" > ci/travis_gbq.json; 7 | elif [[ -n ${!TRAVIS_IV_ENV} ]]; then 8 | openssl aes-256-cbc -K ${!TRAVIS_KEY_ENV} -iv ${!TRAVIS_IV_ENV} \ 9 | -in ci/travis_gbq.json.enc -out ci/travis_gbq.json -d; 10 | export GBQ_PROJECT_ID='pandas-travis'; 11 | echo 'Successfully decrypted gbq credentials' 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /pandas/info.py: -------------------------------------------------------------------------------- 1 | """ 2 | pandas - a powerful data analysis and manipulation library for Python 3 | ===================================================================== 4 | 5 | See http://pandas.pydata.org/ for full documentation. Otherwise, see the 6 | docstrings of the various objects in the pandas namespace: 7 | 8 | Series 9 | DataFrame 10 | Panel 11 | Index 12 | DatetimeIndex 13 | HDFStore 14 | bdate_range 15 | date_range 16 | read_csv 17 | read_fwf 18 | read_table 19 | ols 20 | """ 21 | -------------------------------------------------------------------------------- /ci/before_install_travis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If envars.sh determined we're running in an authorized fork 4 | # and the user opted in to the network cache,and that cached versions 5 | # are available on the cache server, download and deploy the cached 6 | # files to the local filesystem 7 | 8 | echo "inside $0" 9 | 10 | # overview 11 | if [ "${TRAVIS_OS_NAME}" == "linux" ]; then 12 | sh -e /etc/init.d/xvfb start 13 | fi 14 | 15 | true # never fail because bad things happened here 16 | -------------------------------------------------------------------------------- /.binstar.yml: -------------------------------------------------------------------------------- 1 | package: pandas 2 | user: jreback 3 | 4 | install: 5 | - conda config --add channels pandas 6 | 7 | before_script: 8 | - python -V 9 | 10 | platform: 11 | - linux-64 12 | #- linux-32 13 | - osx-64 14 | #- win-32 15 | - win-64 16 | engine: 17 | - python=2.7 18 | - python=3.4 19 | script: 20 | - conda build conda.recipe --quiet 21 | 22 | iotimeout: 600 23 | 24 | build_targets: conda 25 | 26 | notifications: 27 | email: 28 | recipients: ['jeff@reback.net'] 29 | -------------------------------------------------------------------------------- /bench/bench_pivot.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | import string 3 | 4 | 5 | n = 100000 6 | asize = 5 7 | bsize = 5 8 | 9 | letters = np.asarray(list(string.letters), dtype=object) 10 | 11 | data = DataFrame(dict(foo=letters[:asize][np.random.randint(0, asize, n)], 12 | bar=letters[:bsize][np.random.randint(0, bsize, n)], 13 | baz=np.random.randn(n), 14 | qux=np.random.randn(n))) 15 | 16 | table = pivot_table(data, xby=['foo', 'bar']) 17 | -------------------------------------------------------------------------------- /pandas/io/tests/test_s3.py: -------------------------------------------------------------------------------- 1 | import nose 2 | from pandas.util import testing as tm 3 | 4 | from pandas.io.common import _is_s3_url 5 | 6 | 7 | class TestS3URL(tm.TestCase): 8 | def test_is_s3_url(self): 9 | self.assertTrue(_is_s3_url("s3://pandas/somethingelse.com")) 10 | self.assertFalse(_is_s3_url("s4://pandas/somethingelse.com")) 11 | 12 | if __name__ == '__main__': 13 | nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'], 14 | exit=False) 15 | -------------------------------------------------------------------------------- /pandas/src/parser/Makefile: -------------------------------------------------------------------------------- 1 | PYTHONBASE = /Library/Frameworks/EPD64.framework/Versions/Current 2 | NUMPY_INC = /Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/numpy/core/include 3 | PYTHON_INC = -I$(PYTHONBASE)/include/python2.7 -I$(NUMPY_INC) 4 | PYTHON_LINK = -L$(PYTHONBASE)/lib -lpython 5 | 6 | SOURCES = conversions.c parser.c str_to.c 7 | 8 | check-syntax: 9 | gcc -g $(PYTHON_INC) -o /dev/null -S ${CHK_SOURCES} 10 | 11 | test: $(SOURCES) 12 | gcc $(PYTHON_INC) -o test $(SOURCES) 13 | ./test -------------------------------------------------------------------------------- /pandas/tseries/api.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | """ 4 | 5 | # flake8: noqa 6 | 7 | from pandas.tseries.index import DatetimeIndex, date_range, bdate_range 8 | from pandas.tseries.frequencies import infer_freq 9 | from pandas.tseries.tdi import Timedelta, TimedeltaIndex, timedelta_range 10 | from pandas.tseries.period import Period, PeriodIndex, period_range, pnow 11 | from pandas.tseries.resample import TimeGrouper 12 | from pandas.tseries.timedeltas import to_timedelta 13 | from pandas.lib import NaT 14 | import pandas.tseries.offsets as offsets 15 | -------------------------------------------------------------------------------- /pandas/rpy/vars.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | import pandas.rpy.util as util 4 | 5 | 6 | class VAR(object): 7 | """ 8 | 9 | Parameters 10 | ---------- 11 | y : 12 | p : 13 | type : {"const", "trend", "both", "none"} 14 | season : 15 | exogen : 16 | lag_max : 17 | ic : {"AIC", "HQ", "SC", "FPE"} 18 | Information criterion to use, if lag_max is not None 19 | """ 20 | def __init__(y, p=1, type="none", season=None, exogen=None, 21 | lag_max=None, ic=None): 22 | pass 23 | -------------------------------------------------------------------------------- /pandas/tests/test_msgpack/test_subtype.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | from pandas.msgpack import packb 4 | from collections import namedtuple 5 | 6 | 7 | class MyList(list): 8 | pass 9 | 10 | 11 | class MyDict(dict): 12 | pass 13 | 14 | 15 | class MyTuple(tuple): 16 | pass 17 | 18 | 19 | MyNamedTuple = namedtuple('MyNamedTuple', 'x y') 20 | 21 | 22 | def test_types(): 23 | assert packb(MyDict()) == packb(dict()) 24 | assert packb(MyList()) == packb(list()) 25 | assert packb(MyNamedTuple(1, 2)) == packb((1, 2)) 26 | -------------------------------------------------------------------------------- /vb_suite/run_suite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from vbench.api import BenchmarkRunner 3 | from suite import * 4 | 5 | 6 | def run_process(): 7 | runner = BenchmarkRunner(benchmarks, REPO_PATH, REPO_URL, 8 | BUILD, DB_PATH, TMP_DIR, PREPARE, 9 | always_clean=True, 10 | run_option='eod', start_date=START_DATE, 11 | module_dependencies=dependencies) 12 | runner.run() 13 | 14 | if __name__ == '__main__': 15 | run_process() 16 | -------------------------------------------------------------------------------- /bench/alignment.py: -------------------------------------------------------------------------------- 1 | # Setup 2 | from pandas.compat import range, lrange 3 | import numpy as np 4 | import pandas 5 | import la 6 | N = 1000 7 | K = 50 8 | arr1 = np.random.randn(N, K) 9 | arr2 = np.random.randn(N, K) 10 | idx1 = lrange(N) 11 | idx2 = lrange(K) 12 | 13 | # pandas 14 | dma1 = pandas.DataFrame(arr1, idx1, idx2) 15 | dma2 = pandas.DataFrame(arr2, idx1[::-1], idx2[::-1]) 16 | 17 | # larry 18 | lar1 = la.larry(arr1, [idx1, idx2]) 19 | lar2 = la.larry(arr2, [idx1[::-1], idx2[::-1]]) 20 | 21 | for i in range(100): 22 | result = lar1 + lar2 23 | -------------------------------------------------------------------------------- /vb_suite/categoricals.py: -------------------------------------------------------------------------------- 1 | from vbench.benchmark import Benchmark 2 | from datetime import datetime 3 | 4 | common_setup = """from .pandas_vb_common import * 5 | """ 6 | 7 | #---------------------------------------------------------------------- 8 | # Series constructors 9 | 10 | setup = common_setup + """ 11 | s = pd.Series(list('aabbcd') * 1000000).astype('category') 12 | """ 13 | 14 | concat_categorical = \ 15 | Benchmark("concat([s, s])", setup=setup, name='concat_categorical', 16 | start_date=datetime(year=2015, month=7, day=15)) 17 | -------------------------------------------------------------------------------- /vb_suite/source/themes/agogo/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = agogo.css 4 | pygments_style = tango 5 | 6 | [options] 7 | bodyfont = "Verdana", Arial, sans-serif 8 | headerfont = "Georgia", "Times New Roman", serif 9 | pagewidth = 70em 10 | documentwidth = 50em 11 | sidebarwidth = 20em 12 | bgcolor = #eeeeec 13 | headerbg = url(bgtop.png) top left repeat-x 14 | footerbg = url(bgfooter.png) top left repeat-x 15 | linkcolor = #ce5c00 16 | headercolor1 = #204a87 17 | headercolor2 = #3465a4 18 | headerlinkcolor = #fcaf3e 19 | textalign = justify -------------------------------------------------------------------------------- /scripts/build_dist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # build the distribution 4 | LAST=`git tag --sort version:refname | grep -v rc | tail -1` 5 | 6 | echo "Building distribution for: $LAST" 7 | git checkout $LAST 8 | 9 | read -p "Ok to continue (y/n)? " answer 10 | case ${answer:0:1} in 11 | y|Y ) 12 | echo "Building distribution" 13 | python setup.py clean 14 | python setup.py build_ext --inplace 15 | python setup.py sdist --formats=gztar 16 | ;; 17 | * ) 18 | echo "Not building distribution" 19 | ;; 20 | esac 21 | -------------------------------------------------------------------------------- /ci/install_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "inside $0" 4 | 5 | if [ "$INSTALL_TEST" ]; then 6 | source activate pandas 7 | echo "Starting installation test." 8 | conda uninstall cython || exit 1 9 | python "$TRAVIS_BUILD_DIR"/setup.py sdist --formats=zip,gztar || exit 1 10 | pip install "$TRAVIS_BUILD_DIR"/dist/*tar.gz || exit 1 11 | nosetests --exe -A "$NOSE_ARGS" pandas/tests/test_series.py --with-xunit --xunit-file=/tmp/nosetests_install.xml 12 | else 13 | echo "Skipping installation test." 14 | fi 15 | RET="$?" 16 | 17 | exit "$RET" 18 | -------------------------------------------------------------------------------- /doc/_templates/api_redirect.html: -------------------------------------------------------------------------------- 1 | {% set pgn = pagename.split('.') -%} 2 | {% if pgn[-2][0].isupper() -%} 3 | {% set redirect = ["pandas", pgn[-2], pgn[-1], 'html']|join('.') -%} 4 | {% else -%} 5 | {% set redirect = ["pandas", pgn[-1], 'html']|join('.') -%} 6 | {% endif -%} 7 | 8 | 9 | 10 | This API page has moved 11 | 12 | 13 |

This API page has moved here.

14 | 15 | -------------------------------------------------------------------------------- /pandas/io/tests/data/html_encoding/chinese_utf-8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
01
0 漊煻獌 漊煻獌
1 袟袘觕 袟袘觕
2 埱娵徖 埱娵徖
-------------------------------------------------------------------------------- /ci/requirements-3.5_NUMPY_DEV.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate pandas 4 | 5 | echo "install numpy master wheel" 6 | 7 | # remove the system installed numpy 8 | pip uninstall numpy -y 9 | 10 | # we need these for numpy 11 | 12 | # these wheels don't play nice with the conda libgfortran / openblas 13 | # time conda install -n pandas libgfortran openblas || exit 1 14 | 15 | # install numpy wheel from master 16 | pip install --pre --upgrade --no-index --timeout=60 --trusted-host travis-dev-wheels.scipy.org -f http://travis-dev-wheels.scipy.org/ numpy scipy 17 | 18 | true 19 | -------------------------------------------------------------------------------- /pandas/tests/test_msgpack/test_buffer.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | from pandas.msgpack import packb, unpackb 4 | 5 | 6 | def test_unpack_buffer(): 7 | from array import array 8 | buf = array('b') 9 | buf.fromstring(packb((b'foo', b'bar'))) 10 | obj = unpackb(buf, use_list=1) 11 | assert [b'foo', b'bar'] == obj 12 | 13 | 14 | def test_unpack_bytearray(): 15 | buf = bytearray(packb(('foo', 'bar'))) 16 | obj = unpackb(buf, use_list=1) 17 | assert [b'foo', b'bar'] == obj 18 | expected_type = bytes 19 | assert all(type(s) == expected_type for s in obj) 20 | -------------------------------------------------------------------------------- /scripts/hdfstore_panel_perf.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | from pandas.util.testing import rands 3 | from pandas.compat import range 4 | 5 | i, j, k = 7, 771, 5532 6 | 7 | panel = Panel(np.random.randn(i, j, k), 8 | items=[rands(10) for _ in range(i)], 9 | major_axis=DatetimeIndex('1/1/2000', periods=j, 10 | offset=offsets.Minute()), 11 | minor_axis=[rands(10) for _ in range(k)]) 12 | 13 | 14 | store = HDFStore('test.h5') 15 | store.put('test_panel', panel, table=True) 16 | 17 | retrieved = store['test_panel'] 18 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | 2 | # See the docstring in versioneer.py for instructions. Note that you must 3 | # re-run 'versioneer.py setup' after changing this section, and commit the 4 | # resulting files. 5 | 6 | [versioneer] 7 | VCS = git 8 | style = pep440 9 | versionfile_source = pandas/_version.py 10 | versionfile_build = pandas/_version.py 11 | tag_prefix = v 12 | parentdir_prefix = pandas- 13 | 14 | [flake8] 15 | ignore = E731 16 | 17 | [yapf] 18 | based_on_style = pep8 19 | split_before_named_assigns = false 20 | split_penalty_after_opening_bracket = 1000000 21 | split_penalty_logical_operator = 30 22 | -------------------------------------------------------------------------------- /bench/duplicated.R: -------------------------------------------------------------------------------- 1 | N <- 100000 2 | 3 | k1 = rep(NA, N) 4 | k2 = rep(NA, N) 5 | for (i in 1:N){ 6 | k1[i] <- paste(sample(letters, 1), collapse="") 7 | k2[i] <- paste(sample(letters, 1), collapse="") 8 | } 9 | df <- data.frame(a=k1, b=k2, c=rep(1:100, N / 100)) 10 | df2 <- data.frame(a=k1, b=k2) 11 | 12 | timings <- numeric() 13 | timings2 <- numeric() 14 | for (i in 1:50) { 15 | gc() 16 | timings[i] = system.time(deduped <- df[!duplicated(df),])[3] 17 | gc() 18 | timings2[i] = system.time(deduped <- df[!duplicated(df[,c("a", "b")]),])[3] 19 | } 20 | 21 | mean(timings) 22 | mean(timings2) 23 | -------------------------------------------------------------------------------- /pandas/io/tests/data/test1.csv: -------------------------------------------------------------------------------- 1 | index,A,B,C,D 2 | 2000-01-03 00:00:00,0.980268513777,3.68573087906,-0.364216805298,-1.15973806169 3 | 2000-01-04 00:00:00,1.04791624281,-0.0412318367011,-0.16181208307,0.212549316967 4 | 2000-01-05 00:00:00,0.498580885705,0.731167677815,-0.537677223318,1.34627041952 5 | 2000-01-06 00:00:00,1.12020151869,1.56762092543,0.00364077397681,0.67525259227 6 | 2000-01-07 00:00:00,-0.487094399463,0.571454623474,-1.6116394093,0.103468562917 7 | 2000-01-10 00:00:00,0.836648671666,0.246461918642,0.588542635376,1.0627820613 8 | 2000-01-11 00:00:00,-0.157160753327,1.34030689438,1.19577795622,-1.09700699751 -------------------------------------------------------------------------------- /scripts/windows_builder/readme.txt: -------------------------------------------------------------------------------- 1 | This is a collection of windows batch scripts (and a python script) 2 | to rebuild the binaries, test, and upload the binaries for public distribution 3 | upon a commit on github. 4 | 5 | Obviously requires that these be setup on windows 6 | Requires an install of Windows SDK 3.5 and 4.0 7 | Full python installs for each version with the deps 8 | 9 | Currently supporting 10 | 11 | 27-32,27-64,34-32,34-64 12 | 13 | Note that 34 use the 4.0 SDK, while the other suse 3.5 SDK 14 | 15 | I installed these scripts in C:\Builds 16 | 17 | Installed libaries in C:\Installs 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | tseries: pandas/lib.pyx pandas/tslib.pyx pandas/hashtable.pyx 2 | python setup.py build_ext --inplace 3 | 4 | .PHONY : develop build clean clean_pyc tseries doc 5 | 6 | clean: 7 | -python setup.py clean 8 | 9 | clean_pyc: 10 | -find . -name '*.py[co]' -exec rm {} \; 11 | 12 | sparse: pandas/src/sparse.pyx 13 | python setup.py build_ext --inplace 14 | 15 | build: clean_pyc 16 | python setup.py build_ext --inplace 17 | 18 | develop: build 19 | -python setup.py develop 20 | 21 | doc: 22 | -rm -rf doc/build doc/source/generated 23 | cd doc; \ 24 | python make.py clean; \ 25 | python make.py html 26 | -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/test1.csv: -------------------------------------------------------------------------------- 1 | index,A,B,C,D 2 | 2000-01-03 00:00:00,0.980268513777,3.68573087906,-0.364216805298,-1.15973806169 3 | 2000-01-04 00:00:00,1.04791624281,-0.0412318367011,-0.16181208307,0.212549316967 4 | 2000-01-05 00:00:00,0.498580885705,0.731167677815,-0.537677223318,1.34627041952 5 | 2000-01-06 00:00:00,1.12020151869,1.56762092543,0.00364077397681,0.67525259227 6 | 2000-01-07 00:00:00,-0.487094399463,0.571454623474,-1.6116394093,0.103468562917 7 | 2000-01-10 00:00:00,0.836648671666,0.246461918642,0.588542635376,1.0627820613 8 | 2000-01-11 00:00:00,-0.157160753327,1.34030689438,1.19577795622,-1.09700699751 -------------------------------------------------------------------------------- /doc/plots/stats/moments_ewmvol.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import pandas.util.testing as t 3 | import pandas.stats.moments as m 4 | 5 | t.N = 500 6 | ts = t.makeTimeSeries() 7 | ts[::100] = 20 8 | 9 | s = ts.cumsum() 10 | 11 | 12 | plt.figure(figsize=(10, 5)) 13 | plt.plot(s.index, m.ewmvol(s, span=50, min_periods=1).values, color='b') 14 | plt.plot(s.index, m.rolling_std(s, 50, min_periods=1).values, color='r') 15 | 16 | plt.title('Exp-weighted std with shocks') 17 | plt.legend(('Exp-weighted', 'Equal-weighted')) 18 | 19 | f = plt.gcf() 20 | f.autofmt_xdate() 21 | 22 | plt.show() 23 | plt.close('all') 24 | -------------------------------------------------------------------------------- /pandas/io/tests/data/stata6.csv: -------------------------------------------------------------------------------- 1 | byte_,int_,long_,float_,double_,date_td,string_,string_1 2 | 0,0,0,0,0,1960-01-01,"a","a" 3 | 1,1,1,1,1,3014-12-31,"ab","b" 4 | -1,-1,-1,-1,-1,2014-12-31,"abc","c" 5 | 100,32740,-2147483647,-1.7010000002777e+38,-2.000000000000e+307,1970-01-01,"This string has 244 characters, so that ir is the maximum length permitted by Stata. This string has 244 characters, so that ir is the maximum length permitted by Stata. This string has 244 characters, so that ir is the maximum length permitted","d" 6 | -127,-32767,2147483620,1.7010000002777e+38,8.000000000000e+307,1970-01-02,"abcdefghijklmnopqrstuvwxyz","e" 7 | -------------------------------------------------------------------------------- /pandas/rpy/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # GH9602 3 | # deprecate rpy to instead directly use rpy2 4 | 5 | # flake8: noqa 6 | 7 | import warnings 8 | warnings.warn("The pandas.rpy module is deprecated and will be " 9 | "removed in a future version. We refer to external packages " 10 | "like rpy2. " 11 | "\nSee here for a guide on how to port your code to rpy2: " 12 | "http://pandas.pydata.org/pandas-docs/stable/r_interface.html", 13 | FutureWarning, stacklevel=2) 14 | 15 | try: 16 | from .common import importr, r, load_data 17 | except ImportError: 18 | pass 19 | -------------------------------------------------------------------------------- /scripts/preepoch_test.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from pandas import * 3 | 4 | 5 | def panda_test(): 6 | 7 | # generate some data 8 | data = np.random.rand(50, 5) 9 | # generate some dates 10 | dates = DatetimeIndex('1/1/1969', periods=50) 11 | # generate column headings 12 | cols = ['A', 'B', 'C', 'D', 'E'] 13 | 14 | df = DataFrame(data, index=dates, columns=cols) 15 | 16 | # save to HDF5Store 17 | store = HDFStore('bugzilla.h5', mode='w') 18 | store['df'] = df # This gives: OverflowError: mktime argument out of range 19 | store.close() 20 | 21 | 22 | if __name__ == '__main__': 23 | panda_test() 24 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in 2 | include LICENSE 3 | include RELEASE.md 4 | include README.rst 5 | include setup.py 6 | 7 | graft doc 8 | prune doc/build 9 | 10 | graft examples 11 | graft pandas 12 | 13 | global-exclude *.so 14 | global-exclude *.pyd 15 | global-exclude *.pyc 16 | global-exclude *~ 17 | global-exclude \#* 18 | global-exclude .git* 19 | global-exclude .DS_Store 20 | global-exclude *.png 21 | 22 | # include examples/data/* 23 | # recursive-include examples *.py 24 | # recursive-include doc/source * 25 | # recursive-include doc/sphinxext * 26 | # recursive-include LICENSES * 27 | include versioneer.py 28 | include pandas/_version.py 29 | -------------------------------------------------------------------------------- /pandas/msgpack/exceptions.py: -------------------------------------------------------------------------------- 1 | class UnpackException(Exception): 2 | pass 3 | 4 | 5 | class BufferFull(UnpackException): 6 | pass 7 | 8 | 9 | class OutOfData(UnpackException): 10 | pass 11 | 12 | 13 | class UnpackValueError(UnpackException, ValueError): 14 | pass 15 | 16 | 17 | class ExtraData(ValueError): 18 | def __init__(self, unpacked, extra): 19 | self.unpacked = unpacked 20 | self.extra = extra 21 | 22 | def __str__(self): 23 | return "unpack(b) received extra data." 24 | 25 | 26 | class PackException(Exception): 27 | pass 28 | 29 | 30 | class PackValueError(PackException, ValueError): 31 | pass 32 | -------------------------------------------------------------------------------- /LICENSES/MSGPACK_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2008-2011 INADA Naoki 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /scripts/roll_median_leak.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | from pandas import * 3 | 4 | import numpy as np 5 | import os 6 | 7 | from vbench.api import Benchmark 8 | from pandas.util.testing import rands 9 | from pandas.compat import range 10 | import pandas.lib as lib 11 | import pandas._sandbox as sbx 12 | import time 13 | 14 | import psutil 15 | 16 | pid = os.getpid() 17 | proc = psutil.Process(pid) 18 | 19 | lst = SparseList() 20 | lst.append([5] * 10000) 21 | lst.append(np.repeat(np.nan, 1000000)) 22 | 23 | for _ in range(10000): 24 | print(proc.get_memory_info()) 25 | sdf = SparseDataFrame({'A': lst.to_array()}) 26 | chunk = sdf[sdf['A'] == 5] 27 | -------------------------------------------------------------------------------- /test_rebuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | python setup.py clean 4 | python setup.py build_ext --inplace 5 | coverage erase 6 | # nosetests pandas/tests/test_index.py --with-coverage --cover-package=pandas.core --pdb-failure --pdb 7 | #nosetests -w pandas --with-coverage --cover-package=pandas --pdb-failure --pdb #--cover-inclusive 8 | nosetests -w pandas --with-coverage --cover-package=pandas $* #--cover-inclusive 9 | # nosetests -w pandas/io --with-coverage --cover-package=pandas.io --pdb-failure --pdb 10 | # nosetests -w pandas/core --with-coverage --cover-package=pandas.core --pdb-failure --pdb 11 | # nosetests -w pandas/stats --with-coverage --cover-package=pandas.stats 12 | # coverage run runtests.py 13 | -------------------------------------------------------------------------------- /vb_suite/attrs_caching.py: -------------------------------------------------------------------------------- 1 | from vbench.benchmark import Benchmark 2 | 3 | common_setup = """from .pandas_vb_common import * 4 | """ 5 | 6 | #---------------------------------------------------------------------- 7 | # DataFrame.index / columns property lookup time 8 | 9 | setup = common_setup + """ 10 | df = DataFrame(np.random.randn(10, 6)) 11 | cur_index = df.index 12 | """ 13 | stmt = "foo = df.index" 14 | 15 | getattr_dataframe_index = Benchmark(stmt, setup, 16 | name="getattr_dataframe_index") 17 | 18 | stmt = "df.index = cur_index" 19 | setattr_dataframe_index = Benchmark(stmt, setup, 20 | name="setattr_dataframe_index") 21 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | # .coveragerc to control coverage.py 2 | [run] 3 | branch = False 4 | omit = */tests/* 5 | 6 | [report] 7 | # Regexes for lines to exclude from consideration 8 | exclude_lines = 9 | # Have to re-enable the standard pragma 10 | pragma: no cover 11 | 12 | # Don't complain about missing debug-only code: 13 | def __repr__ 14 | if self\.debug 15 | 16 | # Don't complain if tests don't hit defensive assertion code: 17 | raise AssertionError 18 | raise NotImplementedError 19 | 20 | # Don't complain if non-runnable code isn't run: 21 | if 0: 22 | if __name__ == .__main__.: 23 | 24 | ignore_errors = False 25 | 26 | [html] 27 | directory = coverage_html_report 28 | -------------------------------------------------------------------------------- /ci/submit_cython_cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CACHE_File="$HOME/.cache/cython_files.tar" 4 | PYX_CACHE_DIR="$HOME/.cache/pyxfiles" 5 | pyx_file_list=`find ${TRAVIS_BUILD_DIR} -name "*.pyx" -o -name "*.pxd" -o -name "*.pxi.in"` 6 | 7 | rm -rf $CACHE_File 8 | rm -rf $PYX_CACHE_DIR 9 | 10 | home_dir=$(pwd) 11 | 12 | mkdir $PYX_CACHE_DIR 13 | rsync -Rv $pyx_file_list $PYX_CACHE_DIR 14 | 15 | echo "pyx files:" 16 | echo $pyx_file_list 17 | 18 | tar cf ${CACHE_File} --files-from /dev/null 19 | 20 | for i in ${pyx_file_list} 21 | do 22 | f=${i%.pyx} 23 | ls $f.{c,cpp} | tar rf ${CACHE_File} -T - 24 | done 25 | 26 | echo "Cython files in cache tar:" 27 | tar tvf ${CACHE_File} 28 | 29 | exit 0 30 | -------------------------------------------------------------------------------- /pandas/src/skiplist.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "skiplist.h": 2 | ctypedef struct node_t: 3 | node_t **next 4 | int *width 5 | double value 6 | int is_nil 7 | int levels 8 | int ref_count 9 | 10 | ctypedef struct skiplist_t: 11 | node_t *head 12 | node_t **tmp_chain 13 | int *tmp_steps 14 | int size 15 | int maxlevels 16 | 17 | inline skiplist_t* skiplist_init(int) nogil 18 | inline void skiplist_destroy(skiplist_t*) nogil 19 | inline double skiplist_get(skiplist_t*, int, int*) nogil 20 | inline int skiplist_insert(skiplist_t*, double) nogil 21 | inline int skiplist_remove(skiplist_t*, double) nogil 22 | 23 | -------------------------------------------------------------------------------- /pandas/src/helper.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016, PyData Development Team 3 | All rights reserved. 4 | 5 | Distributed under the terms of the BSD Simplified License. 6 | 7 | The full license is in the LICENSE file, distributed with this software. 8 | */ 9 | 10 | #ifndef PANDAS_SRC_HELPER_H_ 11 | #define PANDAS_SRC_HELPER_H_ 12 | 13 | #ifndef PANDAS_INLINE 14 | #if defined(__GNUC__) 15 | #define PANDAS_INLINE static __inline__ 16 | #elif defined(_MSC_VER) 17 | #define PANDAS_INLINE static __inline 18 | #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 19 | #define PANDAS_INLINE static inline 20 | #else 21 | #define PANDAS_INLINE 22 | #endif 23 | #endif 24 | 25 | #endif // PANDAS_SRC_HELPER_H_ 26 | -------------------------------------------------------------------------------- /vb_suite/pandas_vb_common.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | import pandas as pd 3 | from datetime import timedelta 4 | from numpy.random import randn 5 | from numpy.random import randint 6 | from numpy.random import permutation 7 | import pandas.util.testing as tm 8 | import random 9 | import numpy as np 10 | try: 11 | from pandas.compat import range 12 | except ImportError: 13 | pass 14 | 15 | np.random.seed(1234) 16 | try: 17 | import pandas._tseries as lib 18 | except: 19 | import pandas.lib as lib 20 | 21 | try: 22 | Panel = WidePanel 23 | except Exception: 24 | pass 25 | 26 | # didn't add to namespace until later 27 | try: 28 | from pandas.core.index import MultiIndex 29 | except ImportError: 30 | pass 31 | -------------------------------------------------------------------------------- /pandas/tools/tests/data/quotes.csv: -------------------------------------------------------------------------------- 1 | time,ticker,bid,ask 2 | 20160525 13:30:00.023,GOOG,720.50,720.93 3 | 20160525 13:30:00.023,MSFT,51.95,51.95 4 | 20160525 13:30:00.041,MSFT,51.95,51.95 5 | 20160525 13:30:00.048,GOOG,720.50,720.93 6 | 20160525 13:30:00.048,GOOG,720.50,720.93 7 | 20160525 13:30:00.048,GOOG,720.50,720.93 8 | 20160525 13:30:00.048,GOOG,720.50,720.93 9 | 20160525 13:30:00.072,GOOG,720.50,720.88 10 | 20160525 13:30:00.075,AAPL,98.55,98.56 11 | 20160525 13:30:00.076,AAPL,98.55,98.56 12 | 20160525 13:30:00.076,AAPL,98.55,98.56 13 | 20160525 13:30:00.076,AAPL,98.55,98.56 14 | 20160525 13:30:00.078,MSFT,51.95,51.95 15 | 20160525 13:30:00.078,MSFT,51.95,51.95 16 | 20160525 13:30:00.078,MSFT,51.95,51.95 17 | 20160525 13:30:00.078,MSFT,51.92,51.95 18 | -------------------------------------------------------------------------------- /asv_bench/benchmarks/panel_methods.py: -------------------------------------------------------------------------------- 1 | from .pandas_vb_common import * 2 | 3 | 4 | class PanelMethods(object): 5 | goal_time = 0.2 6 | 7 | def setup(self): 8 | self.index = date_range(start='2000', freq='D', periods=1000) 9 | self.panel = Panel(np.random.randn(100, len(self.index), 1000)) 10 | 11 | def time_pct_change_items(self): 12 | self.panel.pct_change(1, axis='items') 13 | 14 | def time_pct_change_major(self): 15 | self.panel.pct_change(1, axis='major') 16 | 17 | def time_pct_change_minor(self): 18 | self.panel.pct_change(1, axis='minor') 19 | 20 | def time_shift(self): 21 | self.panel.shift(1) 22 | 23 | def time_shift_minor(self): 24 | self.panel.shift(1, axis='minor') -------------------------------------------------------------------------------- /bench/bench_pivot.R: -------------------------------------------------------------------------------- 1 | library(reshape2) 2 | 3 | 4 | n <- 100000 5 | a.size <- 5 6 | b.size <- 5 7 | 8 | data <- data.frame(a=sample(letters[1:a.size], n, replace=T), 9 | b=sample(letters[1:b.size], n, replace=T), 10 | c=rnorm(n), 11 | d=rnorm(n)) 12 | 13 | timings <- numeric() 14 | 15 | # acast(melt(data, id=c("a", "b")), a ~ b, mean) 16 | # acast(melt(data, id=c("a", "b")), a + b ~ variable, mean) 17 | 18 | for (i in 1:10) { 19 | gc() 20 | tim <- system.time(acast(melt(data, id=c("a", "b")), a ~ b, mean, 21 | subset=.(variable=="c"))) 22 | timings[i] = tim[3] 23 | } 24 | 25 | mean(timings) 26 | 27 | acast(melt(data, id=c("a", "b")), a ~ b, mean, subset=.(variable="c")) 28 | -------------------------------------------------------------------------------- /conda.recipe/meta.yaml: -------------------------------------------------------------------------------- 1 | package: 2 | name: pandas 3 | version: {{ GIT_DESCRIBE_TAG|replace("v","") }} 4 | 5 | build: 6 | number: {{ GIT_DESCRIBE_NUMBER|int }} 7 | {% if GIT_DESCRIBE_NUMBER|int == 0 %}string: np{{ CONDA_NPY }}py{{ CONDA_PY }}_0 8 | {% else %}string: np{{ CONDA_NPY }}py{{ CONDA_PY }}_{{ GIT_BUILD_STR }}{% endif %} 9 | 10 | source: 11 | git_url: ../ 12 | 13 | requirements: 14 | build: 15 | - python 16 | - cython 17 | - numpy x.x 18 | - setuptools 19 | - pytz 20 | - python-dateutil 21 | 22 | run: 23 | - python 24 | - numpy x.x 25 | - python-dateutil 26 | - pytz 27 | 28 | test: 29 | imports: 30 | - pandas 31 | 32 | about: 33 | home: http://pandas.pydata.org 34 | license: BSD 35 | -------------------------------------------------------------------------------- /asv_bench/benchmarks/pandas_vb_common.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | import pandas as pd 3 | from datetime import timedelta 4 | from numpy.random import randn 5 | from numpy.random import randint 6 | from numpy.random import permutation 7 | import pandas.util.testing as tm 8 | import random 9 | import numpy as np 10 | import threading 11 | try: 12 | from pandas.compat import range 13 | except ImportError: 14 | pass 15 | 16 | np.random.seed(1234) 17 | try: 18 | import pandas._tseries as lib 19 | except: 20 | import pandas.lib as lib 21 | 22 | try: 23 | Panel = Panel 24 | except Exception: 25 | Panel = WidePanel 26 | 27 | # didn't add to namespace until later 28 | try: 29 | from pandas.core.index import MultiIndex 30 | except ImportError: 31 | pass 32 | -------------------------------------------------------------------------------- /pandas/computation/common.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | from pandas.compat import reduce 4 | 5 | 6 | def _ensure_decoded(s): 7 | """ if we have bytes, decode them to unicode """ 8 | if isinstance(s, (np.bytes_, bytes)): 9 | s = s.decode(pd.get_option('display.encoding')) 10 | return s 11 | 12 | 13 | def _result_type_many(*arrays_and_dtypes): 14 | """ wrapper around numpy.result_type which overcomes the NPY_MAXARGS (32) 15 | argument limit """ 16 | try: 17 | return np.result_type(*arrays_and_dtypes) 18 | except ValueError: 19 | # we have > NPY_MAXARGS terms in our expression 20 | return reduce(np.result_type, arrays_and_dtypes) 21 | 22 | 23 | class NameResolutionError(NameError): 24 | pass 25 | -------------------------------------------------------------------------------- /pandas/io/api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Data IO api 3 | """ 4 | 5 | # flake8: noqa 6 | 7 | from pandas.io.parsers import read_csv, read_table, read_fwf 8 | from pandas.io.clipboard import read_clipboard 9 | from pandas.io.excel import ExcelFile, ExcelWriter, read_excel 10 | from pandas.io.pytables import HDFStore, Term, get_store, read_hdf 11 | from pandas.io.json import read_json 12 | from pandas.io.html import read_html 13 | from pandas.io.sql import read_sql, read_sql_table, read_sql_query 14 | from pandas.io.sas.sasreader import read_sas 15 | from pandas.io.feather_format import read_feather 16 | from pandas.io.stata import read_stata 17 | from pandas.io.pickle import read_pickle, to_pickle 18 | from pandas.io.packers import read_msgpack, to_msgpack 19 | from pandas.io.gbq import read_gbq 20 | -------------------------------------------------------------------------------- /pandas/tests/series/common.py: -------------------------------------------------------------------------------- 1 | from pandas.util.decorators import cache_readonly 2 | import pandas.util.testing as tm 3 | import pandas as pd 4 | 5 | _ts = tm.makeTimeSeries() 6 | 7 | 8 | class TestData(object): 9 | 10 | @cache_readonly 11 | def ts(self): 12 | ts = _ts.copy() 13 | ts.name = 'ts' 14 | return ts 15 | 16 | @cache_readonly 17 | def series(self): 18 | series = tm.makeStringSeries() 19 | series.name = 'series' 20 | return series 21 | 22 | @cache_readonly 23 | def objSeries(self): 24 | objSeries = tm.makeObjectSeries() 25 | objSeries.name = 'objects' 26 | return objSeries 27 | 28 | @cache_readonly 29 | def empty(self): 30 | return pd.Series([], index=[]) 31 | -------------------------------------------------------------------------------- /doc/plots/stats/moments_rolling_binary.py: -------------------------------------------------------------------------------- 1 | from moment_plots import * 2 | 3 | np.random.seed(1) 4 | 5 | ts = test_series() 6 | s = ts.cumsum() 7 | ts2 = test_series() 8 | s2 = ts2.cumsum() 9 | 10 | s[20:50] = np.NaN 11 | s[120:150] = np.NaN 12 | fig, axes = plt.subplots(3, 1, figsize=(8, 10), sharex=True) 13 | 14 | ax0, ax1, ax2 = axes 15 | 16 | ax0.plot(s.index, s.values) 17 | ax0.plot(s2.index, s2.values) 18 | ax0.set_title('time series') 19 | 20 | ax1.plot(s.index, m.rolling_corr(s, s2, 50, min_periods=1).values) 21 | ax1.set_title('rolling_corr') 22 | 23 | ax2.plot(s.index, m.rolling_cov(s, s2, 50, min_periods=1).values) 24 | ax2.set_title('rolling_cov') 25 | 26 | fig.autofmt_xdate() 27 | fig.subplots_adjust(bottom=0.10, top=0.95) 28 | 29 | plt.show() 30 | plt.close('all') 31 | -------------------------------------------------------------------------------- /vb_suite/plotting.py: -------------------------------------------------------------------------------- 1 | from vbench.benchmark import Benchmark 2 | from datetime import datetime 3 | 4 | common_setup = """from .pandas_vb_common import * 5 | 6 | try: 7 | from pandas import date_range 8 | except ImportError: 9 | def date_range(start=None, end=None, periods=None, freq=None): 10 | return DatetimeIndex(start, end, periods=periods, offset=freq) 11 | 12 | """ 13 | 14 | #----------------------------------------------------------------------------- 15 | # Timeseries plotting 16 | 17 | setup = common_setup + """ 18 | N = 2000 19 | M = 5 20 | df = DataFrame(np.random.randn(N,M), index=date_range('1/1/1975', periods=N)) 21 | """ 22 | 23 | plot_timeseries_period = Benchmark("df.plot()", setup=setup, 24 | name='plot_timeseries_period') 25 | 26 | -------------------------------------------------------------------------------- /doc/plots/stats/moment_plots.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | import matplotlib.pyplot as plt 4 | import pandas.util.testing as t 5 | import pandas.stats.moments as m 6 | 7 | 8 | def test_series(n=1000): 9 | t.N = n 10 | s = t.makeTimeSeries() 11 | return s 12 | 13 | 14 | def plot_timeseries(*args, **kwds): 15 | n = len(args) 16 | 17 | fig, axes = plt.subplots(n, 1, figsize=kwds.get('size', (10, 5)), 18 | sharex=True) 19 | titles = kwds.get('titles', None) 20 | 21 | for k in range(1, n + 1): 22 | ax = axes[k - 1] 23 | ts = args[k - 1] 24 | ax.plot(ts.index, ts.values) 25 | 26 | if titles: 27 | ax.set_title(titles[k - 1]) 28 | 29 | fig.autofmt_xdate() 30 | fig.subplots_adjust(bottom=0.10, top=0.95) 31 | -------------------------------------------------------------------------------- /asv_bench/benchmarks/attrs_caching.py: -------------------------------------------------------------------------------- 1 | from .pandas_vb_common import * 2 | from pandas.util.decorators import cache_readonly 3 | 4 | 5 | class DataFrameAttributes(object): 6 | goal_time = 0.2 7 | 8 | def setup(self): 9 | self.df = DataFrame(np.random.randn(10, 6)) 10 | self.cur_index = self.df.index 11 | 12 | def time_get_index(self): 13 | self.foo = self.df.index 14 | 15 | def time_set_index(self): 16 | self.df.index = self.cur_index 17 | 18 | 19 | class CacheReadonly(object): 20 | goal_time = 0.2 21 | 22 | def setup(self): 23 | 24 | class Foo: 25 | 26 | @cache_readonly 27 | def prop(self): 28 | return 5 29 | self.obj = Foo() 30 | 31 | def time_cache_readonly(self): 32 | self.obj.prop 33 | -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | command -v coverage >/dev/null && coverage erase 3 | command -v python-coverage >/dev/null && python-coverage erase 4 | # nosetests pandas/tests/test_index.py --with-coverage --cover-package=pandas.core --pdb-failure --pdb 5 | #nosetests -w pandas --with-coverage --cover-package=pandas --pdb-failure --pdb #--cover-inclusive 6 | #nosetests -A "not slow" -w pandas/tseries --with-coverage --cover-package=pandas.tseries $* #--cover-inclusive 7 | nosetests -w pandas --with-coverage --cover-package=pandas $* 8 | # nosetests -w pandas/io --with-coverage --cover-package=pandas.io --pdb-failure --pdb 9 | # nosetests -w pandas/core --with-coverage --cover-package=pandas.core --pdb-failure --pdb 10 | # nosetests -w pandas/stats --with-coverage --cover-package=pandas.stats 11 | # coverage run runtests.py 12 | -------------------------------------------------------------------------------- /scripts/windows_builder/build_27-32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo "starting 27-32" 3 | 4 | setlocal EnableDelayedExpansion 5 | set MSSdk=1 6 | CALL "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x86 /release 7 | set DISTUTILS_USE_SDK=1 8 | 9 | title 27-32 build 10 | echo "building" 11 | cd "c:\users\Jeff Reback\documents\github\pandas" 12 | C:\python27-32\python.exe setup.py build > build.27-32.log 2>&1 13 | 14 | title "installing" 15 | C:\python27-32\python.exe setup.py bdist --formats=wininst > install.27-32.log 2>&1 16 | 17 | echo "testing" 18 | C:\python27-32\scripts\nosetests -A "not slow" build\lib.win32-2.7\pandas > test.27-32.log 2>&1 19 | 20 | echo "versions" 21 | cd build\lib.win32-2.7 22 | C:\python27-32\python.exe ../../ci/print_versions.py > ../../versions.27-32.log 2>&1 23 | 24 | exit 25 | 26 | -------------------------------------------------------------------------------- /scripts/windows_builder/build_27-64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo "starting 27-64" 3 | 4 | setlocal EnableDelayedExpansion 5 | set MSSdk=1 6 | CALL "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x64 /release 7 | set DISTUTILS_USE_SDK=1 8 | 9 | title 27-64 build 10 | echo "building" 11 | cd "c:\users\Jeff Reback\documents\github\pandas" 12 | C:\python27-64\python.exe setup.py build > build.27-64.log 2>&1 13 | 14 | echo "installing" 15 | C:\python27-64\python.exe setup.py bdist --formats=wininst > install.27-64.log 2>&1 16 | 17 | echo "testing" 18 | C:\python27-64\scripts\nosetests -A "not slow" build\lib.win-amd64-2.7\pandas > test.27-64.log 2>&1 19 | 20 | echo "versions" 21 | cd build\lib.win-amd64-2.7 22 | C:\python27-64\python.exe ../../ci/print_versions.py > ../../versions.27-64.log 2>&1 23 | 24 | exit 25 | 26 | -------------------------------------------------------------------------------- /pandas/tseries/interval.py: -------------------------------------------------------------------------------- 1 | 2 | from pandas.core.index import Index 3 | 4 | 5 | class Interval(object): 6 | """ 7 | Represents an interval of time defined by two timestamps 8 | """ 9 | 10 | def __init__(self, start, end): 11 | self.start = start 12 | self.end = end 13 | 14 | 15 | class PeriodInterval(object): 16 | """ 17 | Represents an interval of time defined by two Period objects (time 18 | ordinals) 19 | """ 20 | 21 | def __init__(self, start, end): 22 | self.start = start 23 | self.end = end 24 | 25 | 26 | class IntervalIndex(Index): 27 | """ 28 | 29 | """ 30 | 31 | def __new__(self, starts, ends): 32 | pass 33 | 34 | def dtype(self): 35 | return self.values.dtype 36 | 37 | if __name__ == '__main__': 38 | pass 39 | -------------------------------------------------------------------------------- /scripts/windows_builder/build_34-32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo "starting 34-32" 3 | 4 | setlocal EnableDelayedExpansion 5 | set MSSdk=1 6 | CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /release 7 | set DISTUTILS_USE_SDK=1 8 | 9 | title 34-32 build 10 | echo "building" 11 | cd "c:\users\Jeff Reback\documents\github\pandas" 12 | C:\python34-32\python.exe setup.py build > build.34-32.log 2>&1 13 | 14 | echo "installing" 15 | C:\python34-32\python.exe setup.py bdist --formats=wininst > install.34-32.log 2>&1 16 | 17 | echo "testing" 18 | C:\python34-32\scripts\nosetests -A "not slow" build\lib.win32-3.4\pandas > test.34-32.log 2>&1 19 | 20 | echo "versions" 21 | cd build\lib.win32-3.4 22 | C:\python34-32\python.exe ../../ci/print_versions.py > ../../versions.34-32.log 2>&1 23 | 24 | exit 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /scripts/windows_builder/build_34-64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo "starting 34-64" 3 | 4 | setlocal EnableDelayedExpansion 5 | set MSSdk=1 6 | CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release 7 | set DISTUTILS_USE_SDK=1 8 | 9 | title 34-64 build 10 | echo "building" 11 | cd "c:\users\Jeff Reback\documents\github\pandas" 12 | C:\python34-64\python.exe setup.py build > build.34-64.log 2>&1 13 | 14 | echo "installing" 15 | C:\python34-64\python.exe setup.py bdist --formats=wininst > install.34-64.log 2>&1 16 | 17 | echo "testing" 18 | C:\python34-64\scripts\nosetests -A "not slow" build\lib.win-amd64-3.4\pandas > test.34-64.log 2>&1 19 | 20 | echo "versions" 21 | cd build\lib.win-amd64-3.4 22 | C:\python34-64\python.exe ../../ci/print_versions.py > ../../versions.34-64.log 2>&1 23 | 24 | exit 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /doc/sphinxext/README.rst: -------------------------------------------------------------------------------- 1 | sphinxext 2 | ========= 3 | 4 | This directory contains copies of different sphinx extensions in use in the 5 | pandas documentation. These copies originate from other projects: 6 | 7 | - ``numpydoc`` - Numpy's Sphinx extensions: this can be found at its own 8 | repository: https://github.com/numpy/numpydoc 9 | - ``ipython_directive`` and ``ipython_console_highlighting`` in the folder 10 | `ipython_sphinxext` - Sphinx extensions from IPython: these are included 11 | in IPython: https://github.com/ipython/ipython/tree/master/IPython/sphinxext 12 | 13 | .. note:: 14 | 15 | These copies are maintained at the respective projects, so fixes should, 16 | to the extent possible, be pushed upstream instead of only adapting our 17 | local copy to avoid divergence between the the local and upstream version. 18 | -------------------------------------------------------------------------------- /pandas/compat/chainmap.py: -------------------------------------------------------------------------------- 1 | try: 2 | from collections import ChainMap 3 | except ImportError: 4 | from pandas.compat.chainmap_impl import ChainMap 5 | 6 | 7 | class DeepChainMap(ChainMap): 8 | def __setitem__(self, key, value): 9 | for mapping in self.maps: 10 | if key in mapping: 11 | mapping[key] = value 12 | return 13 | self.maps[0][key] = value 14 | 15 | def __delitem__(self, key): 16 | for mapping in self.maps: 17 | if key in mapping: 18 | del mapping[key] 19 | return 20 | raise KeyError(key) 21 | 22 | # override because the m parameter is introduced in Python 3.4 23 | def new_child(self, m=None): 24 | if m is None: 25 | m = {} 26 | return self.__class__(m, *self.maps) 27 | -------------------------------------------------------------------------------- /ci/README.txt: -------------------------------------------------------------------------------- 1 | Travis is a ci service that's well-integrated with GitHub. 2 | The following types of breakage should be detected 3 | by Travis builds: 4 | 5 | 1) Failing tests on any supported version of Python. 6 | 2) Pandas should install and the tests should run if no optional deps are installed. 7 | That also means tests which rely on optional deps need to raise SkipTest() 8 | if the dep is missing. 9 | 3) unicode related fails when running under exotic locales. 10 | 11 | We tried running the vbench suite for a while, but with varying load 12 | on Travis machines, that wasn't useful. 13 | 14 | Travis currently (4/2013) has a 5-job concurrency limit. Exceeding it 15 | basically doubles the total runtime for a commit through travis, and 16 | since dep+pandas installation is already quite long, this should become 17 | a hard limit on concurrent travis runs. 18 | -------------------------------------------------------------------------------- /ci/check_cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$TRAVIS_PULL_REQUEST" == "false" ] 4 | then 5 | echo "Not a PR: checking for changes in ci/ from last 2 commits" 6 | git diff HEAD~2 --numstat | grep -E "ci/" 7 | ci_changes=$(git diff HEAD~2 --numstat | grep -E "ci/"| wc -l) 8 | else 9 | echo "PR: checking for changes in ci/ from last 2 commits" 10 | git fetch origin pull/${TRAVIS_PULL_REQUEST}/head:PR_HEAD 11 | git diff PR_HEAD~2 --numstat | grep -E "ci/" 12 | ci_changes=$(git diff PR_HEAD~2 --numstat | grep -E "ci/"| wc -l) 13 | fi 14 | 15 | MINICONDA_DIR="$HOME/miniconda/" 16 | CACHE_DIR="$HOME/.cache/" 17 | CCACHE_DIR="$HOME/.ccache/" 18 | 19 | if [ $ci_changes -ne 0 ] 20 | then 21 | echo "Files have changed in ci/ deleting all caches" 22 | rm -rf "$MINICONDA_DIR" 23 | rm -rf "$CACHE_DIR" 24 | rm -rf "$CCACHE_DIR" 25 | fi -------------------------------------------------------------------------------- /ci/appveyor.recipe/meta.yaml: -------------------------------------------------------------------------------- 1 | package: 2 | name: pandas 3 | version: 0.20.0 4 | 5 | build: 6 | number: {{environ.get('APPVEYOR_BUILD_NUMBER', 0)}} # [win] 7 | string: np{{ environ.get('CONDA_NPY') }}py{{ environ.get('CONDA_PY') }}_{{ environ.get('APPVEYOR_BUILD_NUMBER', 0) }} # [win] 8 | 9 | source: 10 | 11 | # conda-build needs a full clone 12 | # rather than a shallow git_url type clone 13 | # https://github.com/conda/conda-build/issues/780 14 | path: ../../ 15 | 16 | requirements: 17 | build: 18 | - python 19 | - cython 20 | - numpy x.x 21 | - setuptools 22 | - pytz 23 | - python-dateutil 24 | 25 | run: 26 | - python 27 | - numpy x.x 28 | - python-dateutil 29 | - pytz 30 | 31 | test: 32 | imports: 33 | - pandas 34 | 35 | about: 36 | home: http://pandas.pydata.org 37 | license: BSD 38 | -------------------------------------------------------------------------------- /scripts/groupby_speed.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | from pandas import * 3 | 4 | rng = DatetimeIndex('1/3/2011', '11/30/2011', offset=offsets.Minute()) 5 | 6 | df = DataFrame(np.random.randn(len(rng), 5), index=rng, 7 | columns=list('OHLCV')) 8 | 9 | rng5 = DatetimeIndex('1/3/2011', '11/30/2011', offset=offsets.Minute(5)) 10 | gp = rng5.asof 11 | grouped = df.groupby(gp) 12 | 13 | 14 | def get1(dt): 15 | k = gp(dt) 16 | return grouped.get_group(k) 17 | 18 | 19 | def get2(dt): 20 | k = gp(dt) 21 | return df.ix[grouped.groups[k]] 22 | 23 | 24 | def f(): 25 | for i, date in enumerate(df.index): 26 | if i % 10000 == 0: 27 | print(i) 28 | get1(date) 29 | 30 | 31 | def g(): 32 | for i, date in enumerate(df.index): 33 | if i % 10000 == 0: 34 | print(i) 35 | get2(date) 36 | -------------------------------------------------------------------------------- /scripts/bench_join_multi.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | 3 | import numpy as np 4 | from pandas.compat import zip, range, lzip 5 | from pandas.util.testing import rands 6 | import pandas.lib as lib 7 | 8 | N = 100000 9 | 10 | key1 = [rands(10) for _ in range(N)] 11 | key2 = [rands(10) for _ in range(N)] 12 | 13 | zipped = lzip(key1, key2) 14 | 15 | 16 | def _zip(*args): 17 | arr = np.empty(N, dtype=object) 18 | arr[:] = lzip(*args) 19 | return arr 20 | 21 | 22 | def _zip2(*args): 23 | return lib.list_to_object_array(lzip(*args)) 24 | 25 | index = MultiIndex.from_arrays([key1, key2]) 26 | to_join = DataFrame({'j1': np.random.randn(100000)}, index=index) 27 | 28 | data = DataFrame({'A': np.random.randn(500000), 29 | 'key1': np.repeat(key1, 5), 30 | 'key2': np.repeat(key2, 5)}) 31 | 32 | # data.join(to_join, on=['key1', 'key2']) 33 | -------------------------------------------------------------------------------- /doc/plots/stats/moments_rolling.py: -------------------------------------------------------------------------------- 1 | from moment_plots import * 2 | 3 | ts = test_series() 4 | s = ts.cumsum() 5 | 6 | s[20:50] = np.NaN 7 | s[120:150] = np.NaN 8 | plot_timeseries(s, 9 | m.rolling_count(s, 50), 10 | m.rolling_sum(s, 50, min_periods=10), 11 | m.rolling_mean(s, 50, min_periods=10), 12 | m.rolling_std(s, 50, min_periods=10), 13 | m.rolling_skew(s, 50, min_periods=10), 14 | m.rolling_kurt(s, 50, min_periods=10), 15 | size=(10, 12), 16 | titles=('time series', 17 | 'rolling_count', 18 | 'rolling_sum', 19 | 'rolling_mean', 20 | 'rolling_std', 21 | 'rolling_skew', 22 | 'rolling_kurt')) 23 | plt.show() 24 | plt.close('all') 25 | -------------------------------------------------------------------------------- /ci/print_versions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | 4 | def show_versions(as_json=False): 5 | import imp 6 | import os 7 | fn = __file__ 8 | this_dir = os.path.dirname(fn) 9 | pandas_dir = os.path.abspath(os.path.join(this_dir, "..")) 10 | sv_path = os.path.join(pandas_dir, 'pandas', 'util') 11 | mod = imp.load_module( 12 | 'pvmod', *imp.find_module('print_versions', [sv_path])) 13 | return mod.show_versions(as_json) 14 | 15 | 16 | if __name__ == '__main__': 17 | # optparse is 2.6-safe 18 | from optparse import OptionParser 19 | parser = OptionParser() 20 | parser.add_option("-j", "--json", metavar="FILE", nargs=1, 21 | help="Save output as JSON into file, pass in '-' to output to stdout") 22 | 23 | (options, args) = parser.parse_args() 24 | 25 | if options.json == "-": 26 | options.json = True 27 | 28 | show_versions(as_json=options.json) 29 | -------------------------------------------------------------------------------- /asv_bench/benchmarks/ctors.py: -------------------------------------------------------------------------------- 1 | from .pandas_vb_common import * 2 | 3 | 4 | class Constructors(object): 5 | goal_time = 0.2 6 | 7 | def setup(self): 8 | self.arr = np.random.randn(100, 100) 9 | self.arr_str = np.array(['foo', 'bar', 'baz'], dtype=object) 10 | 11 | self.data = np.random.randn(100) 12 | self.index = Index(np.arange(100)) 13 | 14 | self.s = Series(([Timestamp('20110101'), Timestamp('20120101'), 15 | Timestamp('20130101')] * 1000)) 16 | 17 | def time_frame_from_ndarray(self): 18 | DataFrame(self.arr) 19 | 20 | def time_series_from_ndarray(self): 21 | pd.Series(self.data, index=self.index) 22 | 23 | def time_index_from_array_string(self): 24 | Index(self.arr_str) 25 | 26 | def time_dtindex_from_series(self): 27 | DatetimeIndex(self.s) 28 | 29 | def time_dtindex_from_series2(self): 30 | Index(self.s) 31 | -------------------------------------------------------------------------------- /pandas/io/tests/data/gbq_fake_job.txt: -------------------------------------------------------------------------------- 1 | {u'status': {u'state': u'DONE'}, u'kind': u'bigquery#job', u'statistics': {u'query': {u'cacheHit': True, u'totalBytesProcessed': u'0'}, u'endTime': u'1377668744674', u'totalBytesProcessed': u'0', u'startTime': u'1377668744466'}, u'jobReference': {u'projectId': u'57288129629', u'jobId': u'bqjob_r5f956972f0190bdf_00000140c374bf42_2'}, u'etag': u'"4PTsVxg68bQkQs1RJ1Ndewqkgg4/oO4VmgFrAku4N6FWci9s7iFIftc"', u'configuration': {u'query': {u'createDisposition': u'CREATE_IF_NEEDED', u'query': u'SELECT * FROM [publicdata:samples.shakespeare]', u'writeDisposition': u'WRITE_TRUNCATE', u'destinationTable': {u'projectId': u'57288129629', u'tableId': u'anonb5ec450da88eeeb78a27784ea482ee75a146d442', u'datasetId': u'_d0b4f5f0d50dc68a3eb0fa6cba66a9a8687d9253'}}}, u'id': u'57288129629:bqjob_r5f956972f0190bdf_00000140c374bf42_2', u'selfLink': u'https://www.googleapis.com/bigquery/v2/projects/57288129629/jobs/bqjob_r5f956972f0190bdf_00000140c374bf42_2'} -------------------------------------------------------------------------------- /pandas/tests/test_msgpack/test_unpack_raw.py: -------------------------------------------------------------------------------- 1 | """Tests for cases where the user seeks to obtain packed msgpack objects""" 2 | 3 | import io 4 | from pandas.msgpack import Unpacker, packb 5 | 6 | 7 | def test_write_bytes(): 8 | unpacker = Unpacker() 9 | unpacker.feed(b'abc') 10 | f = io.BytesIO() 11 | assert unpacker.unpack(f.write) == ord('a') 12 | assert f.getvalue() == b'a' 13 | f = io.BytesIO() 14 | assert unpacker.skip(f.write) is None 15 | assert f.getvalue() == b'b' 16 | f = io.BytesIO() 17 | assert unpacker.skip() is None 18 | assert f.getvalue() == b'' 19 | 20 | 21 | def test_write_bytes_multi_buffer(): 22 | long_val = (5) * 100 23 | expected = packb(long_val) 24 | unpacker = Unpacker(io.BytesIO(expected), read_size=3, max_buffer_size=3) 25 | 26 | f = io.BytesIO() 27 | unpacked = unpacker.unpack(f.write) 28 | assert unpacked == long_val 29 | assert f.getvalue() == expected 30 | -------------------------------------------------------------------------------- /vb_suite/miscellaneous.py: -------------------------------------------------------------------------------- 1 | from vbench.benchmark import Benchmark 2 | from datetime import datetime 3 | 4 | common_setup = """from .pandas_vb_common import * 5 | """ 6 | 7 | #---------------------------------------------------------------------- 8 | # cache_readonly 9 | 10 | setup = common_setup + """ 11 | from pandas.util.decorators import cache_readonly 12 | 13 | class Foo: 14 | 15 | @cache_readonly 16 | def prop(self): 17 | return 5 18 | obj = Foo() 19 | """ 20 | misc_cache_readonly = Benchmark("obj.prop", setup, name="misc_cache_readonly", 21 | ncalls=2000000) 22 | 23 | #---------------------------------------------------------------------- 24 | # match 25 | 26 | setup = common_setup + """ 27 | uniques = tm.makeStringIndex(1000).values 28 | all = uniques.repeat(10) 29 | """ 30 | 31 | match_strings = Benchmark("match(all, uniques)", setup, 32 | start_date=datetime(2012, 5, 12)) 33 | -------------------------------------------------------------------------------- /pandas/io/tests/json/data/tsframe_iso_v012.json: -------------------------------------------------------------------------------- 1 | {"A":{"2000-01-03T00:00:00":1.56808523,"2000-01-04T00:00:00":-0.2550111,"2000-01-05T00:00:00":1.51493992,"2000-01-06T00:00:00":-0.02765498,"2000-01-07T00:00:00":0.05951614},"B":{"2000-01-03T00:00:00":0.65727391,"2000-01-04T00:00:00":-0.08072427,"2000-01-05T00:00:00":0.11805825,"2000-01-06T00:00:00":0.44679743,"2000-01-07T00:00:00":-2.69652057},"C":{"2000-01-03T00:00:00":1.81021139,"2000-01-04T00:00:00":-0.03202878,"2000-01-05T00:00:00":1.629455,"2000-01-06T00:00:00":0.33192641,"2000-01-07T00:00:00":1.28163262},"D":{"2000-01-03T00:00:00":-0.17251653,"2000-01-04T00:00:00":-0.17581665,"2000-01-05T00:00:00":-1.31506612,"2000-01-06T00:00:00":-0.27885413,"2000-01-07T00:00:00":0.34703478},"date":{"2000-01-03T00:00:00":"1992-01-06T18:21:32.120000","2000-01-04T00:00:00":"1992-01-06T18:21:32.120000","2000-01-05T00:00:00":"1992-01-06T18:21:32.120000","2000-01-06T00:00:00":"2013-01-01T00:00:00","2000-01-07T00:00:00":"1992-01-06T18:21:32.120000"}} -------------------------------------------------------------------------------- /doc/_templates/autosummary/class.rst: -------------------------------------------------------------------------------- 1 | {% extends "!autosummary/class.rst" %} 2 | 3 | {% block methods %} 4 | {% if methods %} 5 | 6 | .. 7 | HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. 8 | .. autosummary:: 9 | :toctree: 10 | {% for item in all_methods %} 11 | {%- if not item.startswith('_') or item in ['__call__'] %} 12 | {{ name }}.{{ item }} 13 | {%- endif -%} 14 | {%- endfor %} 15 | 16 | {% endif %} 17 | {% endblock %} 18 | 19 | {% block attributes %} 20 | {% if attributes %} 21 | 22 | .. 23 | HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. 24 | .. autosummary:: 25 | :toctree: 26 | {% for item in all_attributes %} 27 | {%- if not item.startswith('_') %} 28 | {{ name }}.{{ item }} 29 | {%- endif -%} 30 | {%- endfor %} 31 | 32 | {% endif %} 33 | {% endblock %} 34 | -------------------------------------------------------------------------------- /pandas/io/tests/parser/data/salaries.csv: -------------------------------------------------------------------------------- 1 | S X E M 2 | 13876 1 1 1 3 | 11608 1 3 0 4 | 18701 1 3 1 5 | 11283 1 2 0 6 | 11767 1 3 0 7 | 20872 2 2 1 8 | 11772 2 2 0 9 | 10535 2 1 0 10 | 12195 2 3 0 11 | 12313 3 2 0 12 | 14975 3 1 1 13 | 21371 3 2 1 14 | 19800 3 3 1 15 | 11417 4 1 0 16 | 20263 4 3 1 17 | 13231 4 3 0 18 | 12884 4 2 0 19 | 13245 5 2 0 20 | 13677 5 3 0 21 | 15965 5 1 1 22 | 12336 6 1 0 23 | 21352 6 3 1 24 | 13839 6 2 0 25 | 22884 6 2 1 26 | 16978 7 1 1 27 | 14803 8 2 0 28 | 17404 8 1 1 29 | 22184 8 3 1 30 | 13548 8 1 0 31 | 14467 10 1 0 32 | 15942 10 2 0 33 | 23174 10 3 1 34 | 23780 10 2 1 35 | 25410 11 2 1 36 | 14861 11 1 0 37 | 16882 12 2 0 38 | 24170 12 3 1 39 | 15990 13 1 0 40 | 26330 13 2 1 41 | 17949 14 2 0 42 | 25685 15 3 1 43 | 27837 16 2 1 44 | 18838 16 2 0 45 | 17483 16 1 0 46 | 19207 17 2 0 47 | 19346 20 1 0 48 | -------------------------------------------------------------------------------- /doc/plots/stats/moments_expw.py: -------------------------------------------------------------------------------- 1 | from moment_plots import * 2 | 3 | np.random.seed(1) 4 | 5 | ts = test_series(500) * 10 6 | 7 | # ts[::100] = 20 8 | 9 | s = ts.cumsum() 10 | 11 | fig, axes = plt.subplots(3, 1, figsize=(8, 10), sharex=True) 12 | 13 | ax0, ax1, ax2 = axes 14 | 15 | ax0.plot(s.index, s.values) 16 | ax0.set_title('time series') 17 | 18 | ax1.plot(s.index, m.ewma(s, span=50, min_periods=1).values, color='b') 19 | ax1.plot(s.index, m.rolling_mean(s, 50, min_periods=1).values, color='r') 20 | ax1.set_title('rolling_mean vs. ewma') 21 | 22 | line1 = ax2.plot( 23 | s.index, m.ewmstd(s, span=50, min_periods=1).values, color='b') 24 | line2 = ax2.plot( 25 | s.index, m.rolling_std(s, 50, min_periods=1).values, color='r') 26 | ax2.set_title('rolling_std vs. ewmstd') 27 | 28 | fig.legend((line1, line2), 29 | ('Exp-weighted', 'Equal-weighted'), 30 | loc='upper right') 31 | fig.autofmt_xdate() 32 | fig.subplots_adjust(bottom=0.10, top=0.95) 33 | 34 | plt.show() 35 | plt.close('all') 36 | -------------------------------------------------------------------------------- /pandas/computation/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | import warnings 3 | from distutils.version import LooseVersion 4 | 5 | _NUMEXPR_INSTALLED = False 6 | 7 | try: 8 | import numexpr as ne 9 | ver = ne.__version__ 10 | _NUMEXPR_INSTALLED = ver >= LooseVersion('2.1') 11 | 12 | # we specifically disallow 2.4.4 as 13 | # has some hard-to-diagnose bugs 14 | if ver == LooseVersion('2.4.4'): 15 | _NUMEXPR_INSTALLED = False 16 | warnings.warn( 17 | "The installed version of numexpr {ver} is not supported " 18 | "in pandas and will be not be used\n".format(ver=ver), 19 | UserWarning) 20 | 21 | elif not _NUMEXPR_INSTALLED: 22 | warnings.warn( 23 | "The installed version of numexpr {ver} is not supported " 24 | "in pandas and will be not be used\nThe minimum supported " 25 | "version is 2.1\n".format(ver=ver), UserWarning) 26 | 27 | except ImportError: # pragma: no cover 28 | pass 29 | 30 | __all__ = ['_NUMEXPR_INSTALLED'] 31 | -------------------------------------------------------------------------------- /scripts/git_code_churn.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import os 3 | import re 4 | import sys 5 | 6 | import numpy as np 7 | 8 | from pandas import * 9 | 10 | 11 | if __name__ == '__main__': 12 | from vbench.git import GitRepo 13 | repo = GitRepo('/Users/wesm/code/pandas') 14 | churn = repo.get_churn_by_file() 15 | 16 | file_include = [] 17 | for path in churn.major_axis: 18 | if path.endswith('.pyx') or path.endswith('.py'): 19 | file_include.append(path) 20 | commits_include = [sha for sha in churn.minor_axis 21 | if 'LF' not in repo.messages[sha]] 22 | commits_include.remove('dcf3490') 23 | 24 | clean_churn = churn.reindex(major=file_include, minor=commits_include) 25 | 26 | by_commit = clean_churn.sum('major').sum(1) 27 | 28 | by_date = by_commit.groupby(repo.commit_date).sum() 29 | 30 | by_date = by_date.drop([datetime(2011, 6, 10)]) 31 | 32 | # clean out days where I touched Cython 33 | 34 | by_date = by_date[by_date < 5000] 35 | -------------------------------------------------------------------------------- /vb_suite/timedelta.py: -------------------------------------------------------------------------------- 1 | from vbench.api import Benchmark 2 | from datetime import datetime 3 | 4 | common_setup = """from .pandas_vb_common import * 5 | from pandas import to_timedelta 6 | """ 7 | 8 | #---------------------------------------------------------------------- 9 | # conversion 10 | 11 | setup = common_setup + """ 12 | arr = np.random.randint(0,1000,size=10000) 13 | """ 14 | 15 | stmt = "to_timedelta(arr,unit='s')" 16 | timedelta_convert_int = Benchmark(stmt, setup, start_date=datetime(2014, 1, 1)) 17 | 18 | setup = common_setup + """ 19 | arr = np.random.randint(0,1000,size=10000) 20 | arr = [ '{0} days'.format(i) for i in arr ] 21 | """ 22 | 23 | stmt = "to_timedelta(arr)" 24 | timedelta_convert_string = Benchmark(stmt, setup, start_date=datetime(2014, 1, 1)) 25 | 26 | setup = common_setup + """ 27 | arr = np.random.randint(0,60,size=10000) 28 | arr = [ '00:00:{0:02d}'.format(i) for i in arr ] 29 | """ 30 | 31 | stmt = "to_timedelta(arr)" 32 | timedelta_convert_string_seconds = Benchmark(stmt, setup, start_date=datetime(2014, 1, 1)) 33 | -------------------------------------------------------------------------------- /ci/travis_encrypt_gbq.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | GBQ_JSON_FILE=$1 4 | 5 | if [[ $# -ne 1 ]]; then 6 | echo -e "Too few arguments.\nUsage: ./travis_encrypt_gbq.sh "\ 7 | "" 8 | exit 1 9 | fi 10 | 11 | if [[ $GBQ_JSON_FILE != *.json ]]; then 12 | echo "ERROR: Expected *.json file" 13 | exit 1 14 | fi 15 | 16 | if [[ ! -f $GBQ_JSON_FILE ]]; then 17 | echo "ERROR: File $GBQ_JSON_FILE does not exist" 18 | exit 1 19 | fi 20 | 21 | echo "Encrypting $GBQ_JSON_FILE..." 22 | read -d "\n" TRAVIS_KEY TRAVIS_IV <<<$(travis encrypt-file $GBQ_JSON_FILE \ 23 | travis_gbq.json.enc -f | grep -o "\w*_iv\|\w*_key"); 24 | 25 | echo "Adding your secure key to travis_gbq_config.txt ..." 26 | echo -e "TRAVIS_IV_ENV=$TRAVIS_IV\nTRAVIS_KEY_ENV=$TRAVIS_KEY"\ 27 | > travis_gbq_config.txt 28 | 29 | echo "Done. Removing file $GBQ_JSON_FILE" 30 | rm $GBQ_JSON_FILE 31 | 32 | echo -e "Created encrypted credentials file travis_gbq.json.enc.\n"\ 33 | "NOTE: Do NOT commit the *.json file containing your unencrypted" \ 34 | "private key" 35 | -------------------------------------------------------------------------------- /pandas/compat/openpyxl_compat.py: -------------------------------------------------------------------------------- 1 | """ 2 | Detect incompatible version of OpenPyXL 3 | 4 | GH7169 5 | """ 6 | 7 | from distutils.version import LooseVersion 8 | 9 | start_ver = '1.6.1' 10 | stop_ver = '2.0.0' 11 | 12 | 13 | def is_compat(major_ver=1): 14 | """Detect whether the installed version of openpyxl is supported 15 | 16 | Parameters 17 | ---------- 18 | ver : int 19 | 1 requests compatibility status among the 1.x.y series 20 | 2 requests compatibility status of 2.0.0 and later 21 | Returns 22 | ------- 23 | compat : bool 24 | ``True`` if openpyxl is installed and is a compatible version. 25 | ``False`` otherwise. 26 | """ 27 | import openpyxl 28 | ver = LooseVersion(openpyxl.__version__) 29 | if major_ver == 1: 30 | return LooseVersion(start_ver) <= ver < LooseVersion(stop_ver) 31 | elif major_ver == 2: 32 | return LooseVersion(stop_ver) <= ver 33 | else: 34 | raise ValueError('cannot test for openpyxl compatibility with ver {0}' 35 | .format(major_ver)) 36 | -------------------------------------------------------------------------------- /pandas/io/tests/json/data/tsframe_v012.json: -------------------------------------------------------------------------------- 1 | {"A":{"946857600000000000":1.56808523,"946944000000000000":-0.2550111,"947030400000000000":1.51493992,"947116800000000000":-0.02765498,"947203200000000000":0.05951614},"B":{"946857600000000000":0.65727391,"946944000000000000":-0.08072427,"947030400000000000":0.11805825,"947116800000000000":0.44679743,"947203200000000000":-2.69652057},"C":{"946857600000000000":1.81021139,"946944000000000000":-0.03202878,"947030400000000000":1.629455,"947116800000000000":0.33192641,"947203200000000000":1.28163262},"D":{"946857600000000000":-0.17251653,"946944000000000000":-0.17581665,"947030400000000000":-1.31506612,"947116800000000000":-0.27885413,"947203200000000000":0.34703478},"date":{"946857600000000000":694722092120000000,"946944000000000000":694722092120000000,"947030400000000000":694722092120000000,"947116800000000000":1356998400000000000,"947203200000000000":694722092120000000},"modified":{"946857600000000000":694722092120000000,"946944000000000000":null,"947030400000000000":694722092120000000,"947116800000000000":1356998400000000000,"947203200000000000":694722092120000000}} -------------------------------------------------------------------------------- /pandas/io/tests/data/categorical_0_14_1.pickle: -------------------------------------------------------------------------------- 1 | ccopy_reg 2 | _reconstructor 3 | p0 4 | (cpandas.core.categorical 5 | Categorical 6 | p1 7 | c__builtin__ 8 | object 9 | p2 10 | Ntp3 11 | Rp4 12 | (dp5 13 | S'_levels' 14 | p6 15 | cnumpy.core.multiarray 16 | _reconstruct 17 | p7 18 | (cpandas.core.index 19 | Index 20 | p8 21 | (I0 22 | tp9 23 | S'b' 24 | p10 25 | tp11 26 | Rp12 27 | ((I1 28 | (I4 29 | tp13 30 | cnumpy 31 | dtype 32 | p14 33 | (S'O8' 34 | p15 35 | I0 36 | I1 37 | tp16 38 | Rp17 39 | (I3 40 | S'|' 41 | p18 42 | NNNI-1 43 | I-1 44 | I63 45 | tp19 46 | bI00 47 | (lp20 48 | S'a' 49 | p21 50 | ag10 51 | aS'c' 52 | p22 53 | aS'd' 54 | p23 55 | atp24 56 | (Ntp25 57 | tp26 58 | bsS'labels' 59 | p27 60 | g7 61 | (cnumpy 62 | ndarray 63 | p28 64 | (I0 65 | tp29 66 | g10 67 | tp30 68 | Rp31 69 | (I1 70 | (I3 71 | tp32 72 | g14 73 | (S'i8' 74 | p33 75 | I0 76 | I1 77 | tp34 78 | Rp35 79 | (I3 80 | S'<' 81 | p36 82 | NNNI-1 83 | I-1 84 | I0 85 | tp37 86 | bI00 87 | S'\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00' 88 | p38 89 | tp39 90 | bsS'name' 91 | p40 92 | S'foobar' 93 | p41 94 | sb. -------------------------------------------------------------------------------- /LICENSES/SAS7BDAT_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Jared Hobbs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /doc/source/whatsnew/v0.7.2.txt: -------------------------------------------------------------------------------- 1 | .. _whatsnew_0702: 2 | 3 | v.0.7.2 (March 16, 2012) 4 | --------------------------- 5 | 6 | This release targets bugs in 0.7.1, and adds a few minor features. 7 | 8 | New features 9 | ~~~~~~~~~~~~ 10 | 11 | - Add additional tie-breaking methods in DataFrame.rank (:issue:`874`) 12 | - Add ascending parameter to rank in Series, DataFrame (:issue:`875`) 13 | - Add coerce_float option to DataFrame.from_records (:issue:`893`) 14 | - Add sort_columns parameter to allow unsorted plots (:issue:`918`) 15 | - Enable column access via attributes on GroupBy (:issue:`882`) 16 | - Can pass dict of values to DataFrame.fillna (:issue:`661`) 17 | - Can select multiple hierarchical groups by passing list of values in .ix 18 | (:issue:`134`) 19 | - Add ``axis`` option to DataFrame.fillna (:issue:`174`) 20 | - Add level keyword to ``drop`` for dropping values from a level (:issue:`159`) 21 | 22 | Performance improvements 23 | ~~~~~~~~~~~~~~~~~~~~~~~~ 24 | 25 | - Use khash for Series.value_counts, add raw function to algorithms.py (:issue:`861`) 26 | - Intercept __builtin__.sum in groupby (:issue:`885`) 27 | 28 | -------------------------------------------------------------------------------- /ci/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "inside $0" 4 | 5 | source activate pandas 6 | 7 | # don't run the tests for the doc build 8 | if [ x"$DOC_BUILD" != x"" ]; then 9 | exit 0 10 | fi 11 | 12 | if [ -n "$LOCALE_OVERRIDE" ]; then 13 | export LC_ALL="$LOCALE_OVERRIDE"; 14 | echo "Setting LC_ALL to $LOCALE_OVERRIDE" 15 | 16 | pycmd='import pandas; print("pandas detected console encoding: %s" % pandas.get_option("display.encoding"))' 17 | python -c "$pycmd" 18 | fi 19 | 20 | if [ "$BUILD_TEST" ]; then 21 | echo "We are not running nosetests as this is simply a build test." 22 | elif [ "$COVERAGE" ]; then 23 | echo nosetests --exe -A "$NOSE_ARGS" pandas --with-coverage --with-xunit --xunit-file=/tmp/nosetests.xml 24 | nosetests --exe -A "$NOSE_ARGS" pandas --with-coverage --cover-package=pandas --cover-tests --with-xunit --xunit-file=/tmp/nosetests.xml 25 | else 26 | echo nosetests --exe -A "$NOSE_ARGS" pandas --doctest-tests --with-xunit --xunit-file=/tmp/nosetests.xml 27 | nosetests --exe -A "$NOSE_ARGS" pandas --doctest-tests --with-xunit --xunit-file=/tmp/nosetests.xml 28 | fi 29 | 30 | RET="$?" 31 | 32 | exit "$RET" 33 | -------------------------------------------------------------------------------- /pandas/hashtable.pxd: -------------------------------------------------------------------------------- 1 | from khash cimport (kh_int64_t, kh_uint64_t, kh_float64_t, kh_pymap_t, 2 | kh_str_t, uint64_t, int64_t, float64_t) 3 | 4 | # prototypes for sharing 5 | 6 | cdef class HashTable: 7 | pass 8 | 9 | cdef class UInt64HashTable(HashTable): 10 | cdef kh_uint64_t *table 11 | 12 | cpdef get_item(self, uint64_t val) 13 | cpdef set_item(self, uint64_t key, Py_ssize_t val) 14 | 15 | cdef class Int64HashTable(HashTable): 16 | cdef kh_int64_t *table 17 | 18 | cpdef get_item(self, int64_t val) 19 | cpdef set_item(self, int64_t key, Py_ssize_t val) 20 | 21 | cdef class Float64HashTable(HashTable): 22 | cdef kh_float64_t *table 23 | 24 | cpdef get_item(self, float64_t val) 25 | cpdef set_item(self, float64_t key, Py_ssize_t val) 26 | 27 | cdef class PyObjectHashTable(HashTable): 28 | cdef kh_pymap_t *table 29 | 30 | cpdef get_item(self, object val) 31 | cpdef set_item(self, object key, Py_ssize_t val) 32 | 33 | cdef class StringHashTable(HashTable): 34 | cdef kh_str_t *table 35 | 36 | cpdef get_item(self, object val) 37 | cpdef set_item(self, object key, Py_ssize_t val) 38 | -------------------------------------------------------------------------------- /vb_suite/panel_methods.py: -------------------------------------------------------------------------------- 1 | from vbench.api import Benchmark 2 | from datetime import datetime 3 | 4 | common_setup = """from .pandas_vb_common import * 5 | """ 6 | 7 | #---------------------------------------------------------------------- 8 | # shift 9 | 10 | setup = common_setup + """ 11 | index = date_range(start="2000", freq="D", periods=1000) 12 | panel = Panel(np.random.randn(100, len(index), 1000)) 13 | """ 14 | 15 | panel_shift = Benchmark('panel.shift(1)', setup, 16 | start_date=datetime(2012, 1, 12)) 17 | 18 | panel_shift_minor = Benchmark('panel.shift(1, axis="minor")', setup, 19 | start_date=datetime(2012, 1, 12)) 20 | 21 | panel_pct_change_major = Benchmark('panel.pct_change(1, axis="major")', setup, 22 | start_date=datetime(2014, 4, 19)) 23 | 24 | panel_pct_change_minor = Benchmark('panel.pct_change(1, axis="minor")', setup, 25 | start_date=datetime(2014, 4, 19)) 26 | 27 | panel_pct_change_items = Benchmark('panel.pct_change(1, axis="items")', setup, 28 | start_date=datetime(2014, 4, 19)) 29 | -------------------------------------------------------------------------------- /vb_suite/ctors.py: -------------------------------------------------------------------------------- 1 | from vbench.benchmark import Benchmark 2 | from datetime import datetime 3 | 4 | common_setup = """from .pandas_vb_common import * 5 | """ 6 | 7 | #---------------------------------------------------------------------- 8 | # Series constructors 9 | 10 | setup = common_setup + """ 11 | data = np.random.randn(100) 12 | index = Index(np.arange(100)) 13 | """ 14 | 15 | ctor_series_ndarray = \ 16 | Benchmark("Series(data, index=index)", setup=setup, 17 | name='series_constructor_ndarray') 18 | 19 | setup = common_setup + """ 20 | arr = np.random.randn(100, 100) 21 | """ 22 | 23 | ctor_frame_ndarray = \ 24 | Benchmark("DataFrame(arr)", setup=setup, 25 | name='frame_constructor_ndarray') 26 | 27 | setup = common_setup + """ 28 | data = np.array(['foo', 'bar', 'baz'], dtype=object) 29 | """ 30 | 31 | ctor_index_array_string = Benchmark('Index(data)', setup=setup) 32 | 33 | # index constructors 34 | setup = common_setup + """ 35 | s = Series([Timestamp('20110101'),Timestamp('20120101'),Timestamp('20130101')]*1000) 36 | """ 37 | index_from_series_ctor = Benchmark('Index(s)', setup=setup) 38 | 39 | dtindex_from_series_ctor = Benchmark('DatetimeIndex(s)', setup=setup) 40 | -------------------------------------------------------------------------------- /doc/logo/pandas_logo.py: -------------------------------------------------------------------------------- 1 | # script to generate the pandas logo 2 | 3 | from matplotlib import pyplot as plt 4 | from matplotlib import rcParams 5 | import numpy as np 6 | 7 | rcParams['mathtext.fontset'] = 'cm' 8 | 9 | 10 | def fnx(): 11 | return np.random.randint(5, 50, 10) 12 | 13 | 14 | fig = plt.figure(figsize=(6, 1.25)) 15 | 16 | ax = fig.add_axes((0.45, 0.1, 0.16, 0.8)) 17 | bar_data = [2.1, -00.8, 1.1, 2.5, -2.1, -0.5, -2.0, 1.5] 18 | ax.set_ylim(-3, 3) 19 | ax.set_xticks([]) 20 | ax.set_yticks([]) 21 | ax.bar(np.arange(len(bar_data)), bar_data) 22 | 23 | ax = fig.add_axes((0.63, 0.1, 0.16, 0.8)) 24 | for i in range(4): 25 | ax.plot(np.random.rand(8)) 26 | ax.set_xticks([]) 27 | ax.set_yticks([]) 28 | 29 | ax = fig.add_axes((0.63 + 0.18, 0.1, 0.16, 0.8)) 30 | y = np.row_stack((fnx(), fnx(), fnx())) 31 | x = np.arange(10) 32 | y1, y2, y3 = fnx(), fnx(), fnx() 33 | ax.stackplot(x, y1, y2, y3) 34 | ax.set_xticks([]) 35 | ax.set_yticks([]) 36 | 37 | plt.figtext(0.05, 0.5, "pandas", size=40) 38 | 39 | plt.figtext( 40 | 0.05, 0.2, r"$y_{it} = \beta^{\prime} x_{it} + \mu_{i} + \epsilon_{it}$", 41 | size=16, color="#5a89a4") 42 | 43 | fig.savefig('pandas_logo.svg') 44 | fig.savefig('pandas_logo.png') 45 | -------------------------------------------------------------------------------- /doc/source/whatsnew/v0.7.1.txt: -------------------------------------------------------------------------------- 1 | .. _whatsnew_0701: 2 | 3 | v.0.7.1 (February 29, 2012) 4 | --------------------------- 5 | 6 | This release includes a few new features and addresses over a dozen bugs in 7 | 0.7.0. 8 | 9 | New features 10 | ~~~~~~~~~~~~ 11 | 12 | - Add ``to_clipboard`` function to pandas namespace for writing objects to 13 | the system clipboard (:issue:`774`) 14 | - Add ``itertuples`` method to DataFrame for iterating through the rows of a 15 | dataframe as tuples (:issue:`818`) 16 | - Add ability to pass fill_value and method to DataFrame and Series align 17 | method (:issue:`806`, :issue:`807`) 18 | - Add fill_value option to reindex, align methods (:issue:`784`) 19 | - Enable concat to produce DataFrame from Series (:issue:`787`) 20 | - Add ``between`` method to Series (:issue:`802`) 21 | - Add HTML representation hook to DataFrame for the IPython HTML notebook 22 | (:issue:`773`) 23 | - Support for reading Excel 2007 XML documents using openpyxl 24 | 25 | Performance improvements 26 | ~~~~~~~~~~~~~~~~~~~~~~~~ 27 | 28 | - Improve performance and memory usage of fillna on DataFrame 29 | - Can concatenate a list of Series along axis=1 to obtain a DataFrame (:issue:`787`) 30 | 31 | -------------------------------------------------------------------------------- /asv_bench/benchmarks/timedelta.py: -------------------------------------------------------------------------------- 1 | from .pandas_vb_common import * 2 | from pandas import to_timedelta, Timestamp 3 | 4 | 5 | class ToTimedelta(object): 6 | goal_time = 0.2 7 | 8 | def setup(self): 9 | self.arr = np.random.randint(0, 1000, size=10000) 10 | self.arr2 = ['{0} days'.format(i) for i in self.arr] 11 | 12 | self.arr3 = np.random.randint(0, 60, size=10000) 13 | self.arr3 = ['00:00:{0:02d}'.format(i) for i in self.arr3] 14 | 15 | self.arr4 = list(self.arr2) 16 | self.arr4[-1] = 'apple' 17 | 18 | def time_convert_int(self): 19 | to_timedelta(self.arr, unit='s') 20 | 21 | def time_convert_string(self): 22 | to_timedelta(self.arr2) 23 | 24 | def time_convert_string_seconds(self): 25 | to_timedelta(self.arr3) 26 | 27 | def time_convert_coerce(self): 28 | to_timedelta(self.arr4, errors='coerce') 29 | 30 | def time_convert_ignore(self): 31 | to_timedelta(self.arr4, errors='ignore') 32 | 33 | 34 | class Ops(object): 35 | goal_time = 0.2 36 | 37 | def setup(self): 38 | self.td = to_timedelta(np.arange(1000000)) 39 | self.ts = Timestamp('2000') 40 | 41 | def test_add_td_ts(self): 42 | self.td + self.ts 43 | -------------------------------------------------------------------------------- /pandas/tests/series/test_validate.py: -------------------------------------------------------------------------------- 1 | from unittest import TestCase 2 | from pandas.core.series import Series 3 | 4 | 5 | class TestSeriesValidate(TestCase): 6 | """Tests for error handling related to data types of method arguments.""" 7 | s = Series([1, 2, 3, 4, 5]) 8 | 9 | def test_validate_bool_args(self): 10 | # Tests for error handling related to boolean arguments. 11 | invalid_values = [1, "True", [1, 2, 3], 5.0] 12 | 13 | for value in invalid_values: 14 | with self.assertRaises(ValueError): 15 | self.s.reset_index(inplace=value) 16 | 17 | with self.assertRaises(ValueError): 18 | self.s._set_name(name='hello', inplace=value) 19 | 20 | with self.assertRaises(ValueError): 21 | self.s.sort_values(inplace=value) 22 | 23 | with self.assertRaises(ValueError): 24 | self.s.sort_index(inplace=value) 25 | 26 | with self.assertRaises(ValueError): 27 | self.s.sort_index(inplace=value) 28 | 29 | with self.assertRaises(ValueError): 30 | self.s.rename(inplace=value) 31 | 32 | with self.assertRaises(ValueError): 33 | self.s.dropna(inplace=value) 34 | -------------------------------------------------------------------------------- /scripts/touchup_gh_issues.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import print_function 5 | from collections import OrderedDict 6 | import sys 7 | import re 8 | 9 | """ 10 | Reads in stdin, replace all occurences of '#num' or 'GH #num' with 11 | links to github issue. dumps the issue anchors before the next 12 | section header 13 | """ 14 | 15 | pat = "((?:\s*GH\s*)?)#(\d{3,4})([^_]|$)?" 16 | rep_pat = r"\1GH\2_\3" 17 | anchor_pat = ".. _GH{id}: https://github.com/pandas-dev/pandas/issues/{id}" 18 | section_pat = "^pandas\s[\d\.]+\s*$" 19 | 20 | 21 | def main(): 22 | issues = OrderedDict() 23 | while True: 24 | 25 | line = sys.stdin.readline() 26 | if not line: 27 | break 28 | 29 | if re.search(section_pat, line): 30 | for id in issues: 31 | print(anchor_pat.format(id=id).rstrip()) 32 | if issues: 33 | print("\n") 34 | issues = OrderedDict() 35 | 36 | for m in re.finditer(pat, line): 37 | id = m.group(2) 38 | if id not in issues: 39 | issues[id] = True 40 | print(re.sub(pat, rep_pat, line).rstrip()) 41 | pass 42 | 43 | if __name__ == "__main__": 44 | main() 45 | -------------------------------------------------------------------------------- /bench/zoo_bench.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | from pandas.util.testing import rands 3 | 4 | n = 1000000 5 | # indices = Index([rands(10) for _ in xrange(n)]) 6 | 7 | 8 | def sample(values, k): 9 | sampler = np.random.permutation(len(values)) 10 | return values.take(sampler[:k]) 11 | sz = 500000 12 | rng = np.arange(0, 10000000000000, 10000000) 13 | stamps = np.datetime64(datetime.now()).view('i8') + rng 14 | idx1 = np.sort(sample(stamps, sz)) 15 | idx2 = np.sort(sample(stamps, sz)) 16 | ts1 = Series(np.random.randn(sz), idx1) 17 | ts2 = Series(np.random.randn(sz), idx2) 18 | 19 | 20 | # subsample_size = 90000 21 | 22 | # x = Series(np.random.randn(100000), indices) 23 | # y = Series(np.random.randn(subsample_size), 24 | # index=sample(indices, subsample_size)) 25 | 26 | 27 | # lx = larry(np.random.randn(100000), [list(indices)]) 28 | # ly = larry(np.random.randn(subsample_size), [list(y.index)]) 29 | 30 | # Benchmark 1: Two 1-million length time series (int64-based index) with 31 | # randomly chosen timestamps 32 | 33 | # Benchmark 2: Join two 5-variate time series DataFrames (outer and inner join) 34 | 35 | # df1 = DataFrame(np.random.randn(1000000, 5), idx1, columns=range(5)) 36 | # df2 = DataFrame(np.random.randn(1000000, 5), idx2, columns=range(5, 10)) 37 | -------------------------------------------------------------------------------- /asv_bench/benchmarks/plotting.py: -------------------------------------------------------------------------------- 1 | from .pandas_vb_common import * 2 | try: 3 | from pandas import date_range 4 | except ImportError: 5 | def date_range(start=None, end=None, periods=None, freq=None): 6 | return DatetimeIndex(start, end, periods=periods, offset=freq) 7 | from pandas.tools.plotting import andrews_curves 8 | 9 | 10 | class TimeseriesPlotting(object): 11 | goal_time = 0.2 12 | 13 | def setup(self): 14 | import matplotlib 15 | matplotlib.use('Agg') 16 | self.N = 2000 17 | self.M = 5 18 | self.df = DataFrame(np.random.randn(self.N, self.M), index=date_range('1/1/1975', periods=self.N)) 19 | 20 | def time_plot_regular(self): 21 | self.df.plot() 22 | 23 | def time_plot_regular_compat(self): 24 | self.df.plot(x_compat=True) 25 | 26 | 27 | class Misc(object): 28 | goal_time = 0.6 29 | 30 | def setup(self): 31 | import matplotlib 32 | matplotlib.use('Agg') 33 | self.N = 500 34 | self.M = 10 35 | data_dict = {x: np.random.randn(self.N) for x in range(self.M)} 36 | data_dict["Name"] = ["A"] * self.N 37 | self.df = DataFrame(data_dict) 38 | 39 | def time_plot_andrews_curves(self): 40 | andrews_curves(self.df, "Name") 41 | -------------------------------------------------------------------------------- /pandas/tests/test_msgpack/test_except.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | import unittest 4 | from pandas.msgpack import packb, unpackb 5 | 6 | 7 | class DummyException(Exception): 8 | pass 9 | 10 | 11 | class TestExceptions(unittest.TestCase): 12 | 13 | def test_raise_on_find_unsupported_value(self): 14 | import datetime 15 | self.assertRaises(TypeError, packb, datetime.datetime.now()) 16 | 17 | def test_raise_from_object_hook(self): 18 | def hook(obj): 19 | raise DummyException 20 | 21 | self.assertRaises(DummyException, unpackb, packb({}), object_hook=hook) 22 | self.assertRaises(DummyException, unpackb, packb({'fizz': 'buzz'}), 23 | object_hook=hook) 24 | self.assertRaises(DummyException, unpackb, packb({'fizz': 'buzz'}), 25 | object_pairs_hook=hook) 26 | self.assertRaises(DummyException, unpackb, 27 | packb({'fizz': {'buzz': 'spam'}}), object_hook=hook) 28 | self.assertRaises(DummyException, unpackb, 29 | packb({'fizz': {'buzz': 'spam'}}), 30 | object_pairs_hook=hook) 31 | 32 | def test_invalidvalue(self): 33 | self.assertRaises(ValueError, unpackb, b'\xd9\x97#DL_') 34 | -------------------------------------------------------------------------------- /LICENSES/SIX: -------------------------------------------------------------------------------- 1 | six license (substantial portions used in the python 3 compatibility module) 2 | =========================================================================== 3 | Copyright (c) 2010-2013 Benjamin Peterson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | # 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | # 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pandas/tests/frame/test_validate.py: -------------------------------------------------------------------------------- 1 | from unittest import TestCase 2 | from pandas.core.frame import DataFrame 3 | 4 | 5 | class TestDataFrameValidate(TestCase): 6 | """Tests for error handling related to data types of method arguments.""" 7 | df = DataFrame({'a': [1, 2], 'b': [3, 4]}) 8 | 9 | def test_validate_bool_args(self): 10 | # Tests for error handling related to boolean arguments. 11 | invalid_values = [1, "True", [1, 2, 3], 5.0] 12 | 13 | for value in invalid_values: 14 | with self.assertRaises(ValueError): 15 | self.df.query('a > b', inplace=value) 16 | 17 | with self.assertRaises(ValueError): 18 | self.df.eval('a + b', inplace=value) 19 | 20 | with self.assertRaises(ValueError): 21 | self.df.set_index(keys=['a'], inplace=value) 22 | 23 | with self.assertRaises(ValueError): 24 | self.df.reset_index(inplace=value) 25 | 26 | with self.assertRaises(ValueError): 27 | self.df.dropna(inplace=value) 28 | 29 | with self.assertRaises(ValueError): 30 | self.df.drop_duplicates(inplace=value) 31 | 32 | with self.assertRaises(ValueError): 33 | self.df.sort_values(by=['a'], inplace=value) 34 | -------------------------------------------------------------------------------- /pandas/src/datetime_helper.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016, PyData Development Team 3 | All rights reserved. 4 | 5 | Distributed under the terms of the BSD Simplified License. 6 | 7 | The full license is in the LICENSE file, distributed with this software. 8 | */ 9 | 10 | #ifndef PANDAS_SRC_DATETIME_HELPER_H_ 11 | #define PANDAS_SRC_DATETIME_HELPER_H_ 12 | 13 | #include 14 | #include "datetime.h" 15 | #include "numpy/arrayobject.h" 16 | #include "numpy/arrayscalars.h" 17 | 18 | #if PY_MAJOR_VERSION >= 3 19 | #define PyInt_AS_LONG PyLong_AsLong 20 | #endif 21 | 22 | npy_int64 get_long_attr(PyObject *o, const char *attr) { 23 | npy_int64 long_val; 24 | PyObject *value = PyObject_GetAttrString(o, attr); 25 | long_val = (PyLong_Check(value) ? 26 | PyLong_AsLongLong(value) : PyInt_AS_LONG(value)); 27 | Py_DECREF(value); 28 | return long_val; 29 | } 30 | 31 | npy_float64 total_seconds(PyObject *td) { 32 | // Python 2.6 compat 33 | npy_int64 microseconds = get_long_attr(td, "microseconds"); 34 | npy_int64 seconds = get_long_attr(td, "seconds"); 35 | npy_int64 days = get_long_attr(td, "days"); 36 | npy_int64 days_in_seconds = days * 24LL * 3600LL; 37 | return (microseconds + (seconds + days_in_seconds) * 1000000.0) / 1000000.0; 38 | } 39 | 40 | #endif // PANDAS_SRC_DATETIME_HELPER_H_ 41 | -------------------------------------------------------------------------------- /bench/bench_get_put_value.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | from pandas.util.testing import rands 3 | from pandas.compat import range 4 | 5 | N = 1000 6 | K = 50 7 | 8 | 9 | def _random_index(howmany): 10 | return Index([rands(10) for _ in range(howmany)]) 11 | 12 | df = DataFrame(np.random.randn(N, K), index=_random_index(N), 13 | columns=_random_index(K)) 14 | 15 | 16 | def get1(): 17 | for col in df.columns: 18 | for row in df.index: 19 | _ = df[col][row] 20 | 21 | 22 | def get2(): 23 | for col in df.columns: 24 | for row in df.index: 25 | _ = df.get_value(row, col) 26 | 27 | 28 | def put1(): 29 | for col in df.columns: 30 | for row in df.index: 31 | df[col][row] = 0 32 | 33 | 34 | def put2(): 35 | for col in df.columns: 36 | for row in df.index: 37 | df.set_value(row, col, 0) 38 | 39 | 40 | def resize1(): 41 | buf = DataFrame() 42 | for col in df.columns: 43 | for row in df.index: 44 | buf = buf.set_value(row, col, 5.) 45 | return buf 46 | 47 | 48 | def resize2(): 49 | from collections import defaultdict 50 | 51 | buf = defaultdict(dict) 52 | for col in df.columns: 53 | for row in df.index: 54 | buf[col][row] = 5. 55 | 56 | return DataFrame(buf) 57 | -------------------------------------------------------------------------------- /pandas/io/s3.py: -------------------------------------------------------------------------------- 1 | """ s3 support for remote file interactivity """ 2 | from pandas import compat 3 | try: 4 | import s3fs 5 | from botocore.exceptions import NoCredentialsError 6 | except: 7 | raise ImportError("The s3fs library is required to handle s3 files") 8 | 9 | if compat.PY3: 10 | from urllib.parse import urlparse as parse_url 11 | else: 12 | from urlparse import urlparse as parse_url 13 | 14 | 15 | def _strip_schema(url): 16 | """Returns the url without the s3:// part""" 17 | result = parse_url(url) 18 | return result.netloc + result.path 19 | 20 | 21 | def get_filepath_or_buffer(filepath_or_buffer, encoding=None, 22 | compression=None): 23 | fs = s3fs.S3FileSystem(anon=False) 24 | try: 25 | filepath_or_buffer = fs.open(_strip_schema(filepath_or_buffer)) 26 | except (OSError, NoCredentialsError): 27 | # boto3 has troubles when trying to access a public file 28 | # when credentialed... 29 | # An OSError is raised if you have credentials, but they 30 | # aren't valid for that bucket. 31 | # A NoCredentialsError is raised if you don't have creds 32 | # for that bucket. 33 | fs = s3fs.S3FileSystem(anon=True) 34 | filepath_or_buffer = fs.open(_strip_schema(filepath_or_buffer)) 35 | return filepath_or_buffer, None, compression 36 | -------------------------------------------------------------------------------- /pandas/tests/test_msgpack/test_seq.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | import io 4 | import pandas.msgpack as msgpack 5 | 6 | binarydata = bytes(bytearray(range(256))) 7 | 8 | 9 | def gen_binary_data(idx): 10 | return binarydata[:idx % 300] 11 | 12 | 13 | def test_exceeding_unpacker_read_size(): 14 | dumpf = io.BytesIO() 15 | 16 | packer = msgpack.Packer() 17 | 18 | NUMBER_OF_STRINGS = 6 19 | read_size = 16 20 | 21 | # 5 ok for read_size=16, while 6 glibc detected *** python: double free or 22 | # corruption (fasttop): 23 | 24 | # 20 ok for read_size=256, while 25 segfaults / glibc detected *** python: 25 | # double free or corruption (!prev) 26 | 27 | # 40 ok for read_size=1024, while 50 introduces errors 28 | # 7000 ok for read_size=1024*1024, while 8000 leads to glibc detected *** 29 | # python: double free or corruption (!prev): 30 | 31 | for idx in range(NUMBER_OF_STRINGS): 32 | data = gen_binary_data(idx) 33 | dumpf.write(packer.pack(data)) 34 | 35 | f = io.BytesIO(dumpf.getvalue()) 36 | dumpf.close() 37 | 38 | unpacker = msgpack.Unpacker(f, read_size=read_size, use_list=1) 39 | 40 | read_count = 0 41 | for idx, o in enumerate(unpacker): 42 | assert type(o) == bytes 43 | assert o == gen_binary_data(idx) 44 | read_count += 1 45 | 46 | assert read_count == NUMBER_OF_STRINGS 47 | -------------------------------------------------------------------------------- /pandas/stats/common.py: -------------------------------------------------------------------------------- 1 | 2 | _WINDOW_TYPES = { 3 | 0: 'full_sample', 4 | 1: 'rolling', 5 | 2: 'expanding' 6 | } 7 | # also allow 'rolling' as key 8 | _WINDOW_TYPES.update((v, v) for k, v in list(_WINDOW_TYPES.items())) 9 | _ADDITIONAL_CLUSTER_TYPES = set(("entity", "time")) 10 | 11 | 12 | def _get_cluster_type(cluster_type): 13 | # this was previous behavior 14 | if cluster_type is None: 15 | return cluster_type 16 | try: 17 | return _get_window_type(cluster_type) 18 | except ValueError: 19 | final_type = str(cluster_type).lower().replace("_", " ") 20 | if final_type in _ADDITIONAL_CLUSTER_TYPES: 21 | return final_type 22 | raise ValueError('Unrecognized cluster type: %s' % cluster_type) 23 | 24 | 25 | def _get_window_type(window_type): 26 | # e.g., 0, 1, 2 27 | final_type = _WINDOW_TYPES.get(window_type) 28 | # e.g., 'full_sample' 29 | final_type = final_type or _WINDOW_TYPES.get( 30 | str(window_type).lower().replace(" ", "_")) 31 | if final_type is None: 32 | raise ValueError('Unrecognized window type: %s' % window_type) 33 | return final_type 34 | 35 | 36 | def banner(text, width=80): 37 | """ 38 | 39 | """ 40 | toFill = width - len(text) 41 | 42 | left = toFill // 2 43 | right = toFill - left 44 | 45 | return '%s%s%s' % ('-' * left, text, '-' * right) 46 | -------------------------------------------------------------------------------- /pandas/tools/tests/data/trades.csv: -------------------------------------------------------------------------------- 1 | time,ticker,price,quantity,marketCenter 2 | 20160525 13:30:00.023,MSFT,51.9500,75,NASDAQ 3 | 20160525 13:30:00.038,MSFT,51.9500,155,NASDAQ 4 | 20160525 13:30:00.048,GOOG,720.7700,100,NASDAQ 5 | 20160525 13:30:00.048,GOOG,720.9200,100,NASDAQ 6 | 20160525 13:30:00.048,GOOG,720.9300,200,NASDAQ 7 | 20160525 13:30:00.048,GOOG,720.9300,300,NASDAQ 8 | 20160525 13:30:00.048,GOOG,720.9300,600,NASDAQ 9 | 20160525 13:30:00.048,GOOG,720.9300,44,NASDAQ 10 | 20160525 13:30:00.074,AAPL,98.6700,478343,NASDAQ 11 | 20160525 13:30:00.075,AAPL,98.6700,478343,NASDAQ 12 | 20160525 13:30:00.075,AAPL,98.6600,6,NASDAQ 13 | 20160525 13:30:00.075,AAPL,98.6500,30,NASDAQ 14 | 20160525 13:30:00.075,AAPL,98.6500,75,NASDAQ 15 | 20160525 13:30:00.075,AAPL,98.6500,20,NASDAQ 16 | 20160525 13:30:00.075,AAPL,98.6500,35,NASDAQ 17 | 20160525 13:30:00.075,AAPL,98.6500,10,NASDAQ 18 | 20160525 13:30:00.075,AAPL,98.5500,6,ARCA 19 | 20160525 13:30:00.075,AAPL,98.5500,6,ARCA 20 | 20160525 13:30:00.076,AAPL,98.5600,1000,ARCA 21 | 20160525 13:30:00.076,AAPL,98.5600,200,ARCA 22 | 20160525 13:30:00.076,AAPL,98.5600,300,ARCA 23 | 20160525 13:30:00.076,AAPL,98.5600,400,ARCA 24 | 20160525 13:30:00.076,AAPL,98.5600,600,ARCA 25 | 20160525 13:30:00.076,AAPL,98.5600,200,ARCA 26 | 20160525 13:30:00.078,MSFT,51.9500,783,NASDAQ 27 | 20160525 13:30:00.078,MSFT,51.9500,100,NASDAQ 28 | 20160525 13:30:00.078,MSFT,51.9500,100,NASDAQ 29 | -------------------------------------------------------------------------------- /pandas/io/tests/data/stata5.csv: -------------------------------------------------------------------------------- 1 | byte_,int_,long_,float_,double_,date_td,string_,string_1 2 | 0,0,0,0,0,,"a","a" 3 | 1,1,1,1,1,,"ab","b" 4 | -1,-1,-1,-1,-1,,"abc","c" 5 | 100,32740,-2147483647,-1.70100000027769e+38,-2.0000000000000e+307,1970-01-01,"abcdefghijklmnop","d" 6 | -127,-32767,2147483620,1.70100000027769e+38,8.0000000000000e+307,1970-01-02,"abcdefghijklmnopqrstuvwxyz","e" 7 | ,0,,,,2014-01-01,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","f" 8 | 0,,,,,2114-01-01,"1234567890","1" 9 | ,,0,,,2014-12-31,"This string has 244 characters, so that ir is the maximum length permitted by Stata. This string has 244 characters, so that ir is the maximum length permitted by Stata. This string has 244 characters, so that ir is the maximum length permitted","2" 10 | .a,.a,.a,.a,.a,2012-02-29,"!","A" 11 | 100,32740,-2.15e+09,-1.70e+38,-2.0e+307,01jan1970,"abcdefghijklmnop","d" 12 | -127,-32767,2.15e+09,1.70e+38,8.0e+307,02jan1970,"abcdefghijklmnopqrstuvwxyz","e" 13 | ,0,,,,01jan2014,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","f" 14 | 0,,,,,01jan2114,"1234567890","1" 15 | ,,0,,,31dec2014,"This string has 244 characters, so that ir is the maximum length permitted by Stata. This string has 244 characters, so that ir is the maximum length permitted by Stata. This string has 244 characters, so that ir is the maximum length permitted","2" 16 | .a,.a,.a,.a,.a,29feb2012,"!","A" 17 | .z,.z,.z,.z,.z,,"&","Z" 18 | ,,,0,,,"1.23","!" 19 | ,,,,0,,"10jan1970","." 20 | -------------------------------------------------------------------------------- /scripts/bench_join.R: -------------------------------------------------------------------------------- 1 | library(xts) 2 | 3 | iterations <- 50 4 | 5 | ns = c(100, 1000, 10000, 100000, 1000000) 6 | kinds = c("outer", "left", "inner") 7 | 8 | result = matrix(0, nrow=3, ncol=length(ns)) 9 | n <- 100000 10 | pct.overlap <- 0.2 11 | 12 | k <- 1 13 | 14 | for (ni in 1:length(ns)){ 15 | n <- ns[ni] 16 | rng1 <- 1:n 17 | offset <- as.integer(n * pct.overlap) 18 | rng2 <- rng1 + offset 19 | x <- xts(matrix(rnorm(n * k), nrow=n, ncol=k), 20 | as.POSIXct(Sys.Date()) + rng1) 21 | y <- xts(matrix(rnorm(n * k), nrow=n, ncol=k), 22 | as.POSIXct(Sys.Date()) + rng2) 23 | timing <- numeric() 24 | for (i in 1:3) { 25 | kind = kinds[i] 26 | for(j in 1:iterations) { 27 | gc() # just to be sure 28 | timing[j] <- system.time(merge(x,y,join=kind))[3] 29 | } 30 | #timing <- system.time(for (j in 1:iterations) merge.xts(x, y, join=kind), 31 | # gcFirst=F) 32 | #timing <- as.list(timing) 33 | result[i, ni] <- mean(timing) * 1000 34 | #result[i, ni] = (timing$elapsed / iterations) * 1000 35 | } 36 | } 37 | 38 | rownames(result) <- kinds 39 | colnames(result) <- log10(ns) 40 | 41 | mat <- matrix(rnorm(500000), nrow=100000, ncol=5) 42 | set.seed(12345) 43 | indexer <- sample(1:100000) 44 | 45 | timing <- rep(0, 10) 46 | for (i in 1:10) { 47 | gc() 48 | timing[i] = system.time(mat[indexer,])[3] 49 | } 50 | 51 | -------------------------------------------------------------------------------- /release_stats.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while [[ $# > 1 ]] 4 | do 5 | key="$1" 6 | 7 | case $key in 8 | --from) 9 | FROM="$2" 10 | shift # past argument 11 | ;; 12 | --to) 13 | TO="$2" 14 | shift # past argument 15 | ;; 16 | *) 17 | # unknown option 18 | ;; 19 | esac 20 | shift # past argument or value 21 | done 22 | 23 | if [ -z "$FROM" ]; then 24 | FROM=`git tag --sort v:refname | grep -v rc | tail -1` 25 | fi 26 | 27 | if [ -z "$TO" ]; then 28 | TO="" 29 | fi 30 | 31 | START=`git log $FROM.. --simplify-by-decoration --pretty="format:%ai %d" | tail -1 | gawk '{ print $1 }'` 32 | END=`git log $TO.. --simplify-by-decoration --pretty="format:%ai %d" | head -1 | gawk '{ print $1 }'` 33 | 34 | git log $FROM.. --format='%an#%s' | grep -v Merge > commits 35 | 36 | # Include a summary by contributor in release notes: 37 | # cat commits | gawk -F '#' '{ print "- " $1 }' | sort | uniq 38 | 39 | echo "Stats since <$FROM> [$START - $END]" 40 | echo "" 41 | 42 | AUTHORS=`cat commits | gawk -F '#' '{ print $1 }' | sort | uniq | wc -l` 43 | echo "Number of authors: $AUTHORS" 44 | 45 | TCOMMITS=`cat commits | gawk -F '#' '{ print $1 }'| wc -l` 46 | echo "Total commits : $TCOMMITS" 47 | 48 | # Include a summary count of commits included in the release by contributor: 49 | # cat commits | gawk -F '#' '{ print $1 }' | sort | uniq -c | sort -nr 50 | 51 | /bin/rm commits 52 | -------------------------------------------------------------------------------- /vb_suite/replace.py: -------------------------------------------------------------------------------- 1 | from vbench.api import Benchmark 2 | from datetime import datetime 3 | 4 | common_setup = """from .pandas_vb_common import * 5 | from datetime import timedelta 6 | 7 | N = 1000000 8 | 9 | try: 10 | rng = date_range('1/1/2000', periods=N, freq='min') 11 | except NameError: 12 | rng = DatetimeIndex('1/1/2000', periods=N, offset=datetools.Minute()) 13 | date_range = DateRange 14 | 15 | ts = Series(np.random.randn(N), index=rng) 16 | """ 17 | 18 | large_dict_setup = """from .pandas_vb_common import * 19 | from pandas.compat import range 20 | n = 10 ** 6 21 | start_value = 10 ** 5 22 | to_rep = dict((i, start_value + i) for i in range(n)) 23 | s = Series(np.random.randint(n, size=10 ** 3)) 24 | """ 25 | 26 | replace_fillna = Benchmark('ts.fillna(0., inplace=True)', common_setup, 27 | name='replace_fillna', 28 | start_date=datetime(2012, 4, 4)) 29 | replace_replacena = Benchmark('ts.replace(np.nan, 0., inplace=True)', 30 | common_setup, 31 | name='replace_replacena', 32 | start_date=datetime(2012, 5, 15)) 33 | replace_large_dict = Benchmark('s.replace(to_rep, inplace=True)', 34 | large_dict_setup, 35 | name='replace_large_dict', 36 | start_date=datetime(2014, 4, 6)) 37 | -------------------------------------------------------------------------------- /scripts/bench_refactor.py: -------------------------------------------------------------------------------- 1 | from pandas import * 2 | from pandas.compat import range 3 | try: 4 | import pandas.core.internals as internals 5 | reload(internals) 6 | import pandas.core.frame as frame 7 | reload(frame) 8 | from pandas.core.frame import DataFrame as DataMatrix 9 | except ImportError: 10 | pass 11 | 12 | N = 1000 13 | K = 500 14 | 15 | 16 | def horribly_unconsolidated(): 17 | index = np.arange(N) 18 | 19 | df = DataMatrix(index=index) 20 | 21 | for i in range(K): 22 | df[i] = float(K) 23 | 24 | return df 25 | 26 | 27 | def bench_reindex_index(df, it=100): 28 | new_idx = np.arange(0, N, 2) 29 | for i in range(it): 30 | df.reindex(new_idx) 31 | 32 | 33 | def bench_reindex_columns(df, it=100): 34 | new_cols = np.arange(0, K, 2) 35 | for i in range(it): 36 | df.reindex(columns=new_cols) 37 | 38 | 39 | def bench_join_index(df, it=10): 40 | left = df.reindex(index=np.arange(0, N, 2), 41 | columns=np.arange(K // 2)) 42 | right = df.reindex(columns=np.arange(K // 2 + 1, K)) 43 | for i in range(it): 44 | joined = left.join(right) 45 | 46 | if __name__ == '__main__': 47 | df = horribly_unconsolidated() 48 | left = df.reindex(index=np.arange(0, N, 2), 49 | columns=np.arange(K // 2)) 50 | right = df.reindex(columns=np.arange(K // 2 + 1, K)) 51 | bench_join_index(df) 52 | -------------------------------------------------------------------------------- /pandas/msgpack/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | from collections import namedtuple 4 | 5 | from pandas.msgpack.exceptions import * # noqa 6 | from pandas.msgpack._version import version # noqa 7 | 8 | 9 | class ExtType(namedtuple('ExtType', 'code data')): 10 | """ExtType represents ext type in msgpack.""" 11 | def __new__(cls, code, data): 12 | if not isinstance(code, int): 13 | raise TypeError("code must be int") 14 | if not isinstance(data, bytes): 15 | raise TypeError("data must be bytes") 16 | if not 0 <= code <= 127: 17 | raise ValueError("code must be 0~127") 18 | return super(ExtType, cls).__new__(cls, code, data) 19 | 20 | import os # noqa 21 | 22 | from pandas.msgpack._packer import Packer # noqa 23 | from pandas.msgpack._unpacker import unpack, unpackb, Unpacker # noqa 24 | 25 | 26 | def pack(o, stream, **kwargs): 27 | """ 28 | Pack object `o` and write it to `stream` 29 | 30 | See :class:`Packer` for options. 31 | """ 32 | packer = Packer(**kwargs) 33 | stream.write(packer.pack(o)) 34 | 35 | 36 | def packb(o, **kwargs): 37 | """ 38 | Pack object `o` and return packed bytes 39 | 40 | See :class:`Packer` for options. 41 | """ 42 | return Packer(**kwargs).pack(o) 43 | 44 | # alias for compatibility to simplejson/marshal/pickle. 45 | load = unpack 46 | loads = unpackb 47 | 48 | dump = pack 49 | dumps = packb 50 | --------------------------------------------------------------------------------