Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize Perspective schema #2130

Merged
merged 1 commit into from
Mar 30, 2021
Merged

Serialize Perspective schema #2130

merged 1 commit into from
Mar 30, 2021

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Mar 30, 2021

Ensures that Perspective handles datetime and other dtypes correctly and also handles pandas (multi-)indexes and column pivots.

Fixes #2124

data = pd.DataFrame({
    "int": np.arange(100),
    "float": [i * 1.5 for i in range(100)],
    "bool": [True for i in range(100)],
    "date": [date.today() for i in range(100)],
    "datetime": [datetime.now() for i in range(100)],
    "string": [chr(64+i) for i in range(100)]
})


pn.pane.Perspective(
    data, sizing_mode='stretch_width', height=400
)

Screen Shot 2021-03-30 at 1 04 44 PM

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #2130 (0a69250) into master (089acd5) will decrease coverage by 0.37%.
The diff coverage is 10.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2130      +/-   ##
==========================================
- Coverage   84.19%   83.81%   -0.38%     
==========================================
  Files         182      182              
  Lines       21533    21637     +104     
==========================================
+ Hits        18129    18135       +6     
- Misses       3404     3502      +98     
Impacted Files Coverage Δ
panel/pane/perspective.py 52.88% <9.25%> (-38.92%) ⬇️
panel/models/perspective.py 100.00% <100.00%> (ø)
panel/io/reload.py 64.36% <0.00%> (-2.30%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 089acd5...0a69250. Read the comment docs.

@philippjfr philippjfr merged commit 7410371 into master Mar 30, 2021
@philippjfr philippjfr deleted the perspective_schema branch March 30, 2021 11:07
philippjfr added a commit that referenced this pull request Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PerspectiveWidget Doesn't Respect Pandas Datatype datetime64[ns] and others
1 participant