Commit Graph

59 Commits

Author SHA1 Message Date
Hari Subbaraj 857458c37c [DataFrame] Implemented prod, product, added test suite (#1994)
* implemented prod/product, modified declaration for sum, added pandas test suite

* fixed tests

* removed test_analytics file

* implemented nunique, skew

* fixed requested changes

* added nunique, skew

* fixed tests in request

* added newline back

* fixed newlines hopefully

* fixed flake8 issues

* more flake8 issues

* fixed test for prod
2018-05-05 21:25:42 -07:00
Jae Min Kim 36fd64800b [DataFrame] Implemented __setitem__, select_dtypes, and astype (#1941)
* added reindex, __setitem__, select_dtypes, and astype functionality

* readded tests for astype and select_dtypes

* fixed index issue with reindex

* lint spacing

* removing current reindex implementation for future pr

* wrong testing func

* errors now raised in the workers, but suppressing them can be an issue

* updated code for select_dtypes

* Update test_dataframe.py
2018-05-05 20:27:29 -07:00
Rohan Singh 8509a51291 [DataFrame] Implement diff (#1996)
* added diff method

* sanity checks

* flake8

* updated sanity checks'

* rebase and style updates

* updated diff tests and cleaned up code

* updated tests for periods

* flake8
2018-05-05 00:44:52 -07:00
Hari Subbaraj a58629f53f [DataFrame] Implemented nunique, skew (#1995)
* implemented prod/product, modified declaration for sum, added pandas test suite

* fixed tests

* removed test_analytics file

* implemented nunique, skew

* fixed changes for nunique, skew

* fixed nunique test

* added axis=1 test to skew

* flake8 issues

* more flake8 issues

* resolve some flake issues
2018-05-04 12:22:10 -07:00
Kunal Gosar 4030356b51 [DataFrame] Implements filter and dropna (#1959)
* implement filter

* begin implementation of dropna

* implement dropna

* docs and tests

* resolving comments

* resolving merge

* add error checking to dropna

* fix update inplace call

* Implement multiple axis for dropna (#13)

* Implement multiple axis for dropna

* Add multiple axis dropna test

* Fix using dummy_frame in dropna

* Clean up dropna multiple axis tests

* remove unnecessary axis modification

* Clean up dropna tests

* resolve comments

* fix lint
2018-05-04 12:21:16 -07:00
Peter Veerman 22d4950fae [DataFrame] Implements df.pipe (#1999)
* Add empty df test

* Fix flake8 issues

* rebase with master

* reset master tests

* Implement df.pipe

* fix tests

* Use test_pipe as a pytest.fixture

* Add newline at EOF
2018-05-04 10:16:05 -07:00
Omkar Salpekar a1d7bb31a4 [DataFrame] Apply() for Lists and Dicts (#1973)
* working for non-string functions and not lists of functions

* works with functions as strings now as well

* fixed linting errors

* throwing a warning if the input is a dictionary

* added dict of lists functionality

* fix minor indexing errors and lint

* removed some commented out code

* some comments and thoughts for apply

* cleaned up code a little bit and added todos

* improved performance

* error checking and code cleanup and comments

* small change

* improved list performance a lot

* agg calls apply for lists

* addressing comments on the PR

* col_metadata change

* updated tests to expect TypeError where appropriate
2018-05-04 10:05:00 -07:00
Alok Singh cdf94c18a4 Clean up syntax for supported Python versions. (#1963)
* Use set/dict literal syntax

Ran code through [pyupgrade](https://github.com/asottile/pyupgrade). This is
supported in every Python version 2.7+.

* Drop unnecessary string format specification

No need to specify 0,1.. if paramters are passed in order.

* Revert "Drop unnecessary string format specification"

This reverts commit efa5ec85d30ff69f34e5ed93e31343fea7647bcb.

* Undo changes to cloudpickle

Drop use of set literal until cloudpickle uses it.

* Reformat code with YAPF

We need to set up a git pre-push hook to automatically run this stuff.
2018-05-03 07:45:11 -07:00
Kunal Gosar d85ee0bc04 [DataFrame] Implements mode, to_datetime, and get_dummies (#1956)
* implement mode and fix getitem

* mode broken on misaligned partitions

* fully implement mode

* implement to_datetime

* implement get_dummies

* implement tests

* fix __getitem__

* fix python2 compatibility

* fix getitem bug

* resolving comments

* Adding documentation

* resolving comment

* resolve name change

* speeding up getitem

* complete rebase
2018-05-02 23:21:00 -07:00
Peter Schafhalter d67b786291 [DataFrame] Fix dtypes (#1930)
* Add map, reduce, merge_dtypes

bug fixes

Unify dtypes on DataFrame creation

Formatting and comments

Cache dtypes

Fix bug in _merge_dtypes

Fix bug

Changed caching logic

Fix dtypes issue in read_csv

Invalidate dtypes cache when inserting column

Simplify unifying dtypes and improve caching

Fix typo

Better caching of dtypes

Fix merge conflicts

* Correct dtypes on initialization
2018-05-02 23:04:19 -07:00
Devin Petersohn 4badc04bb2 [DataFrame] Add layer of abstraction to allow OID instantiation (#1984) 2018-05-02 22:29:52 -04:00
Patrick Yang 5589426484 [DataFrame] Fix blocking issue on _IndexMetadata passing (#1965)
* metadata passing fixes

* fix flake8

* fix test failures

* overhaul indexmetadata

* variable name change

* optimization for building coord df

* addressing comments

* subtle bug fixes
2018-05-01 23:27:49 -07:00
Devin Petersohn 7c1d569a49 [DataFrame] Implement df.merge (#1964)
* Begin merge implementation

* Some cleanup

* Continue cleanup

* Allowing merge on index

* Copy dataframes to clear plasma read-only error

* Make some notes, WIP

* Cleaned up code a bit, still need more error checking

* Adding error checking and addressing comments

* Addressing comment

* Adding test

* Addressing rebase artifact

* Fixing indexing bug

* Some minor cleanup
2018-05-01 21:40:53 -04:00
Omkar Salpekar 1231aa0582 [DataFrame] Sample implement (#1954)
* implemented sample - need to test

* sample fully working

* added sanity check tests

* added some comments to clarify the _deploy_func call

* some more clarifying comments

* added explanatory comments

* minor change in weights_sum for sample
2018-04-30 10:42:28 -07:00
Devin Petersohn 0c477fbbca [DataFrame] Implement Inter-DataFrame operations (#1937) 2018-04-30 06:42:07 -07:00
Devin Petersohn 1d1df7bbec [DataFrame] Fully implement append, concat and join (#1932) 2018-04-23 17:09:57 -07:00
Kunal Gosar 29c36f2bce [DataFrame] Fix for __getitem__ string indexing (#1939)
* edge case fixes for __getitem__

* Enable None indexing
2018-04-23 13:13:14 -07:00
Kunal Gosar 7c9f39241e [DataFrame] Implementing write methods (#1918)
* Add in write methods and functionality

* infer highest available pickle version

* Fix import rebase artifact

* formatting changes to test

* fix lint
2018-04-22 21:25:33 -07:00
Devin Petersohn 8f59546ef2 [DataFrame] Implementing API correct groupby with aggregation methods (#1914) 2018-04-21 17:28:16 -07:00
adgirish 3c48783a16 [DataFrame] Adding read methods and tests (#1712)
* Adding read methods and tests

* Referencing internal partition method so constructors are more canonical with Pandas

* Fixing to reference from_pandas in utils

* Cleaning up unused imports

* rerunning tests

* fixing flake8

* resolving errors

* Added sql and sas test

* updating

* Temporarily phasing out read_csv code for wrapper while diagnosing, added io tests to travis

* Adding travis

* restoring distributed read csv

* resolving rebases

* lint

* Sampling out HD test

* adding dep

* fix pathing

* Flagging out tests

* resolving read_method issues

* fix build issue

* move additional dependencies to extras

* fixing lint

* removing IO dependencies

* updated requirements doc
2018-04-20 18:33:08 -07:00
Omkar Salpekar 0728d4719b [DataFrame] Eval fix (#1903)
* eval now works without assignment - helper function a bit hacky

* removed df.copy() from eval_helper

* one test still failing for qury

* all eval tests passing now

* added check to eval arge verification

* added tests to travis

* added optimization and some comments

* added pd.eval and passes all tests

* added ray dataframe back to test file

* optimizations and code cleanup for eval

* changed position of pandas import in __init__

* fixed linting errors

* fixing eval in __init__.py

* fixed travis file - removed extra tests

* removed test directory from linting exclude for travis
2018-04-18 08:48:32 -07:00
Devin Petersohn 3c817ad908 Add slice functionality (#1832) 2018-04-16 08:50:56 -07:00
Patrick Yang f505f0642f [DataFrame] Pass read_csv kwargs to _infer_column (#1894)
* pass kwargs to _infer_column

* adding small test for non-comma delim

* fix lint
2018-04-16 08:47:30 -07:00
Peter Schafhalter 1d605e8f8a [DataFrame] Inherit documentation from Pandas (#1727)
* Added _inherit_docstrings

* DataFrame documentation inherits from Pandas

* Fix formatting

* Replace hasattr and document properties

* Fix rebase

* Override documentation for groupby

* Override documentation for series

* Don't overwrite property docstrings

* Fix property __doc__ for python2
2018-04-12 20:30:19 -07:00
Omkar Salpekar a3ddde398c [DataFrame] Fixed repr, info, and memory_usage (#1874)
* working with dataframes with too many rows and columns

* repr works for jupyter notebooks now

* added comments and test file

* added repr test file to .travis.yml

* added back ray.dataframe as pd to test file

* fixed pandas importing issues in test file

* getting the front and back of df more efficiently

* only keeping dataframe tests in travis

* fixing numpy array for row and col lengths issue

* doesn't add dimensions if df is small enough

* implemented memory_usage()

* completed memory_usage - still failing 2 tests

* only failing one test for memory_usage

* all repr and dataframes tests passing now

* fixing error related to python2 in info()

* fixing python2 errors

* fixed linting errosr

* using _arithmetic_helper in memory_usage()

* fixed last lint error

* removed testing-specific code

* adding back travis test

* removing extra tests from travis

* re-added concat test

* fixes with new indexing scheme

* code cleanup

* fully working with new indexing scheme

* added tests for info and memory_usage

* removed test file
2018-04-11 08:07:07 -07:00
Devin Petersohn 806b2c844e Fix getattr compat (#1871) 2018-04-10 21:28:59 -07:00
Patrick Yang 521b549e4a [DataFrame] Encapsulate index and lengths into separate class (#1849)
* baseline impl for index_df.py

* added skeleton for index_df.py

* initial impl index_df

* separate out partition and non-partition impls

* add len function

* drop returns index_df slice of dropped indices

* housecleaning

* Integrate index overhaul

* Rename index df to index metadata

* Fix flake8 issues

* Addressing issues

* fix import issue

* Added metadata passing to constructor
2018-04-10 14:30:20 -07:00
Peter Schafhalter 405b05d58a [DataFrame] Implemented __getattr__ (#1753)
* __getattr__ accesses columns

* Added test
2018-04-10 10:19:33 -07:00
adgirish efeaacbedc Adding support for concat (#1739)
adding tests

fixing flake8

adding init

flake 8 on test

fixing tests, imports, and flake8

handling for index

adding tests for row, index

added more robust error handling for axis

fixing test failures

cleaning up error sfor 2.7

updating travis

resolving import

fixing flake8

moved import order

Fixing to refactor and delaying implementing ray-pd inner concat

resolving ray-pd concat and from_pandas mutation

Revert "resolving ray-pd concat and from_pandas mutation"

This reverts commit 5db43e4e89e328286532f3ef98a4526575c5d08d.
2018-04-09 21:36:24 -07:00
Devin Petersohn 0d9a7a3c19 [DataFrame] Update architecture to be more flexible and performant (#1821) 2018-04-05 15:14:33 -07:00
Rohan Singh 1f027344f1 [Dataframes] Implemented .describe() (#1696)
* added describe methods

* mean updates and added truediv func

* updates

* updated truediv test

* porting stocks to ubuntu

* hacky solution for describe, mean, median, quantile by transposing df

* removed data file

* removed faulty truediv implementation

* flake8 and documentation updates

* updated mean, median, var, std to handle mixed values

* added describe methods

* mean updates and added truediv func

* updates

* updated truediv test

* porting stocks to ubuntu

* hacky solution for describe, mean, median, quantile by transposing df

* removed data file

* removed faulty truediv implementation

* flake8 and documentation updates

* fixed quantile to drop object typed columns

* syntax improvements"

* fixed flatten issue

* fixing flatten issue

* minor updates

* added describe methods

* mean updates and added truediv func

* updates

* updated truediv test

* porting stocks to ubuntu

* hacky solution for describe, mean, median, quantile by transposing df

* removed data file

* removed faulty truediv implementation

* flake8 and documentation updates

* updated mean, median, var, std to handle mixed values

* added describe methods

* mean updates and added truediv func

* updates

* updated truediv test

* porting stocks to ubuntu

* hacky solution for describe, mean, median, quantile by transposing df

* removed data file

* removed faulty truediv implementation

* flake8 and documentation updates

* fixed quantile to drop object typed columns

* syntax improvements"

* fixed flatten issue

* fixing flatten issue

* improved describe syntax
2018-03-15 21:16:59 -07:00
Devin Petersohn 8c1066cdba [DataFrame] Implemented cummax, cummin, cumsum, cumprod (#1705)
* cummax, cummin, cumsum, cumprod

* added remote function

* Fix lint

* Fixing tests and linting

* Fix lint
2018-03-13 10:06:34 -07:00
Jae Min Kim 737120952e [Dataframes] Reorganization (#1676)
* moved helper functions for dataframes into df_utils

* Updating base on review comments

* fixed bug with from_pandas

* Updating formatting

* Fix lint
2018-03-12 19:13:33 -07:00
Peter Veerman 6455ec934b [DataFrame] Implements DataFrame.rename, DataFrame.rename_axis, and Index.set_names (#1573)
* Index update

* Fixed transpose bug with nan values

* Fix lint

* Add rename tests

* Implement DataFrame.rename, DataFrame.rename_axis, and Index.set_names

* Temp

* Fixing rename for new index implementation

Fix rebase merges

* Fix rename and rename_axis to work with new index.

Re-add pytest fixture

Clean up rebase artifacts

Remove index.py file

* Addressing minor points

* Addressing comments
2018-03-12 19:05:32 -07:00
Robert Nishihara cae108d019 Replace special single quote with regular single quote. (#1693) 2018-03-10 20:36:01 -08:00
Peter Veerman 2b747ba46c [DataFrame] Implement .fillna(), .ffill(), .bfill(), .eval(), and .drop() (#1544)
* Implement ray.DataFrame.drop w/ tests

* Implement ray.DataFrame.eval w/ tests

Fix flake8 issues

* Fix flake8 issues in dataframe.py

* Implement fillna

* Implement fillna

* Implement ffill and bfill

* Define helper functions outside of method invocation

* Implement ray.DataFrame.eval w/ tests

* Index update

* Fixed transpose bug with nan values

* Fix lint

* Implement fillna

* Use ray index to check if labels exist in df

* Fix ValueError catching

* Remove duplicate test methods

* Add documentation for .fillna(), .ffill(), .bfill(), .eval(), and .drop()

Fix flake8 errors

* Remove notebook files

* Change fillna, eval, drop to use new index type

* Fix documentation for fillna, eval and drop

temp

Temp

temp

temp

temp

* Update drop to work with new type of ray index

* Fix flake8 errors

* Refactor fillna fix for index
2018-03-09 07:37:27 -08:00
Rohan Singh 0abebb0975 [Dataframes] Implement .__len__(), .__contains__(), .first_valid_index(), and .last_valid_index() (#1664)
* added len, contains, first_valid_index, last_valid_index

* fixed contains test cases

* test files updated for PR
2018-03-06 23:56:11 -08:00
Devin Petersohn 4af42d5bb6 [DataFrame] Adding error checking for pandas version (#1662)
* Adding error checking for pandas version

* Addressing comments
2018-03-06 09:57:49 -08:00
Kunal Gosar 6685d4c446 fix tail and finish repr and str (#1628) 2018-03-02 15:26:54 -08:00
Robert Nishihara 1222d09224 Fix dataframe test linting and test. (#1629) 2018-02-28 15:21:49 -08:00
Devin Petersohn e7df293946 [DataFrames] Updating Error messages to encourage contribution. (#1623) 2018-02-27 21:44:33 -08:00
Kunal Gosar 4a15c2c65c [Dataframes] Call ray.init() on ray.dataframe import (#1626)
* ray.init on dataframe import

* wrapping ray.init in a try/except

* removing ray.init calls from test code

* resolving flake8
2018-02-27 16:11:23 -08:00
Kunal Gosar 34664dbf76 [DataFrame] Pass lengths to _default_index instead of df (#1621)
* Pass lengths to remote function over DataFrame

* Increasing performance by moving length to remote
2018-02-27 02:38:26 -08:00
Simon Mo 4ab16d7fb3 [DataFrame] Implement loc, iloc (#1612)
* Add parquet-cpp to gitignore

* Add read_csv and read_parquet

* Gitignore pytest_cache

* Fix flake8

* Add io to __init__

* Changing Index. Currently running tests, but so far untested.

* Removing issue of reassigning DF in from_pandas

* Fixing lint

* Fix bug

* Fix bug

* Fix bug

* Better performance

* Fixing index issue with sum

* Address comments

* Update io with index

* Updating performance and implementation. Adding tests

* Fixing off-by-1

* Fix lint

* Address Comments

* Make pop compatible with new to_pandas

* Format Code

* Cleanup some index issue

* Bug fix: assigned reset_index back

* Implement loc and iloc

* Revert whitespace

* Format code

* Address comments
2018-02-27 01:57:52 -08:00
Kunal Gosar f43328f332 moved _default_index to remote fn (#1617) 2018-02-26 21:12:04 -08:00
Kunal Gosar 48bd7b147d [DataFrame] Added Implementations for equals, query, and some other operations (#1610)
* Implemented Dataframe __abs__ and __iter__

* implemented __neg__

* implemented query

* Implemented equals

* Implemented __eq__ and __ne__ operators

* Added method level comments

* resolved flake8 comments

* resolving devin's comments
2018-02-26 18:31:00 -08:00
Simon Mo d78a22f94c [DataFrame] Implement IO for ray_df (#1599)
* Add parquet-cpp to gitignore

* Add read_csv and read_parquet

* Gitignore pytest_cache

* Fix flake8

* Add io to __init__

* Changing Index. Currently running tests, but so far untested.

* Removing issue of reassigning DF in from_pandas

* Fixing lint

* Fix bug

* Fix bug

* Fix bug

* Better performance

* Fixing index issue with sum

* Address comments

* Update io with index

* Updating performance and implementation. Adding tests

* Fixing off-by-1

* Fix lint

* Address Comments

* Make pop compatible with new to_pandas

* Format Code

* Cleanup some index issue

* Bug fix: assigned reset_index back

* Remove unused debug line
2018-02-26 18:26:38 -08:00
Devin Petersohn 1fa59f1887 [DataFrame] Adding insert, set_axis, set_index, reset_index and tests (#1603) 2018-02-26 08:58:15 -08:00
Devin Petersohn 529397b35e [DataFrames] Updating Index implementation, performance improvements (#1598) 2018-02-25 13:39:28 -08:00
Devin Petersohn de6fa02c85 [DataFrame] Fix transpose with nan values and add functionality needed for Index (#1545) 2018-02-21 08:46:37 -08:00