-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #231: "Lock Zoom" button on 3D Scatter & Surface charts for locking camera on animations * global & instance-level flag to turn off cell editing * added the ability to upload CSVs * upgraded prismjs * #234: update to line animations so that you can lock axes and highlight last point * #233: add candlestick charts * #241: total counts vs. count (non-nan) in describe * #240: force convert to float * #239: converting mixed columns * #237: updated "Pivot" reshaper to always using pivot_table * #236: "inplace" & "drop_index" parameters for memory optimization and parquet loader
- Loading branch information
1 parent
e5f07db
commit 26326bc
Showing
57 changed files
with
1,989 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import pandas as pd | ||
import requests | ||
from six import BytesIO | ||
|
||
from dtale.app import show | ||
from dtale.cli.clickutils import get_loader_options, loader_prop_keys | ||
|
||
""" | ||
IMPORTANT!!! These global variables are required for building any customized CLI loader. | ||
When build_loaders runs startup it will search for any modules containing the global variable LOADER_KEY. | ||
""" | ||
LOADER_KEY = "parquet" | ||
LOADER_PROPS = [ | ||
dict(name="path", help="path to parquet file or URL to parquet endpoint"), | ||
dict(name="engine", help="parquet library to use"), | ||
] | ||
|
||
|
||
# IMPORTANT!!! This function is required if you would like to be able to use this loader from the back-end. | ||
def show_loader(**kwargs): | ||
return show(data_loader=lambda: loader_func(**kwargs), **kwargs) | ||
|
||
|
||
def loader_func(**kwargs): | ||
path = kwargs.pop("path") | ||
return pd.read_parquet( | ||
path, **{k: v for k, v in kwargs.items() if k in loader_prop_keys(LOADER_PROPS)} | ||
) | ||
|
||
|
||
# IMPORTANT!!! This function is required for building any customized CLI loader. | ||
def find_loader(kwargs): | ||
""" | ||
JSON implementation of data loader which will return a function if any of the | ||
`click` options based on LOADER_KEY & LOADER_PROPS have been used, otherwise return None | ||
:param kwargs: Optional keyword arguments to be passed from `click` | ||
:return: data loader function for Parquet implementation | ||
""" | ||
parquet_opts = get_loader_options(LOADER_KEY, kwargs) | ||
if len([f for f in parquet_opts.values() if f]): | ||
|
||
def _json_loader(): | ||
parquet_arg_parsers = {} # TODO: add additional arg parsers | ||
kwargs = { | ||
k: parquet_arg_parsers.get(k, lambda v: v)(v) | ||
for k, v in json_opts.items() | ||
} | ||
return loader_func(**kwargs) | ||
|
||
return _json_loader | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.