Skip to content

Commit

Permalink
Make column renaming compatible with more pandas versions
Browse files Browse the repository at this point in the history
  • Loading branch information
joelostblom committed Mar 12, 2024
1 parent 16ccfab commit 53c4401
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
select_x = alt.selection_point(fields=['level_0'], name='select_x', value='b')
select_y = alt.selection_point(fields=['level_1'], name='select_y', value='d')
heatmap = alt.Chart(
ex_ts.drop(columns='date').corr().stack().reset_index(name='correlation'),
ex_ts.drop(columns='date').corr().stack().reset_index().rename(columns={0: 'correlation'}),
title='Click a tile to compare timeseries',
height=250,
width=250,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
select_x = alt.selection_point(fields=['level_0'], name='select_x', value='b')
select_y = alt.selection_point(fields=['level_1'], name='select_y', value='d')
heatmap = alt.Chart(
ex_ts.drop(columns='date').corr().stack().reset_index(name='correlation'),
ex_ts.drop(columns='date').corr().stack().reset_index().rename(columns={0: 'correlation'}),
title='Click a tile to compare timeseries',
height=250,
width=250,
Expand Down

0 comments on commit 53c4401

Please sign in to comment.