Created
February 18, 2020 00:58
-
-
Save Viveckh/6f87ae263d260e42701b62643ae48c44 to your computer and use it in GitHub Desktop.
HiPlot Experiment Fetcher for loading local csv experiments
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
import hiplot as hip | |
def fetch_local_csv_experiment(uri): | |
# Only apply this fetcher if the URI starts with webxp:// | |
PREFIX="localcsvxp://" | |
if not uri.startswith(PREFIX): | |
# Let other fetchers handle this one | |
raise hip.ExperimentFetcherDoesntApply() | |
# Parse out the local file path from the uri | |
local_path = uri[len(PREFIX):] # Remove the prefix | |
# Return the hiplot experiment to render | |
return hip.Experiment.from_csv(local_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment