Skip to content

Commit

Permalink
Override Pandas DataFrames created from I/O pandas operations (#207)
Browse files Browse the repository at this point in the history
* update export tutorial to add explanation for standalone argument

* minor fixes and remove cell output in notebooks

* added contributing doc

* fix bugs and uncomment some tests

* remove raise warning

* remove unnecessary import

* split up rename test into two parts

* fix setting warning, fix data_type bugs and add relevant tests

* remove ordinal data type

* add test for small dataframe resetting index

* add loc and iloc tests

* fix attribute access directly to dataframe

* add small changes to code

* added test for qcut and cut

* add check if dtype is Interval

* added qcut test

* fix Record KeyError

* add tests

* take care of reset_index case

* small edits

* add data_model to column_group Clause

* small edits for row_group

* fixes to row group

* add config for start and cap for samples

* finish sampling config and tests

* black formatting

* add documentation for sampling config

* remove small added issues

* minor changes to docs

* implement heatmap flag and add tests

* black formatting and documentation edits

* add pd.io equalities for DataFrames

Co-authored-by: Doris Lee <dorisjunglinlee@gmail.com>
  • Loading branch information
westernguy2 and dorisjlee committed Jan 8, 2021
1 parent 3393b9f commit 9dc0958
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion lux/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,37 @@ def setOption(overridePandas=True):
if overridePandas:
pd.DataFrame = (
pd.io.json._json.DataFrame
) = pd.io.parsers.DataFrame = pd.core.frame.DataFrame = LuxDataFrame
) = (
pd.io.parsers.DataFrame
) = (
pd.io.sql.DataFrame
) = (
pd.io.excel.DataFrame
) = (
pd.io.formats.DataFrame
) = (
pd.io.sas.DataFrame
) = (
pd.io.clipboards.DataFrame
) = (
pd.io.common.DataFrame
) = (
pd.io.feather_format.DataFrame
) = (
pd.io.gbq.DataFrame
) = (
pd.io.html.DataFrame
) = (
pd.io.orc.DataFrame
) = (
pd.io.parquet.DataFrame
) = (
pd.io.pickle.DataFrame
) = (
pd.io.pytables.DataFrame
) = (
pd.io.spss.DataFrame
) = pd.io.stata.DataFrame = pd.io.api.DataFrame = pd.core.frame.DataFrame = LuxDataFrame
pd.Series = LuxSeries
else:
pd.DataFrame = pd.io.parsers.DataFrame = pd.core.frame.DataFrame = originalDF
Expand Down

0 comments on commit 9dc0958

Please sign in to comment.