Skip to content

Commit c8504ae

Browse files
authored
Merge pull request #254 from abostroem/issue236
adding key to df.to_hdf calls to avoid warning
2 parents 84ddee2 + 0aa2ffe commit c8504ae

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

episodes/03-transform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ We can write a Pandas `DataFrame` to an HDF5 file like this:
736736
```python
737737
filename = 'gd1_data.hdf'
738738

739-
results_df.to_hdf(filename, 'results_df', mode='w')
739+
results_df.to_hdf(filename, key='results_df', mode='w')
740740
```
741741

742742
Because an HDF5 file can contain more than one Dataset, we have to

episodes/04-motion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ We can add to our existing Pandas `DataFrame` to an HDF5 file by omitting the `m
568568
```python
569569
filename = 'gd1_data.hdf'
570570

571-
selected_df.to_hdf(filename, 'selected_df')
571+
selected_df.to_hdf(filename, key='selected_df')
572572
```
573573

574574
Because an HDF5 file can contain more than one Dataset, we have to
@@ -592,7 +592,7 @@ Hint: Since the file already exists, you should *not* use `mode='w'`.
592592
## Solution
593593

594594
```python
595-
centerline_df.to_hdf(filename, 'centerline_df')
595+
centerline_df.to_hdf(filename, key='centerline_df')
596596
```
597597

598598
:::::::::::::::::::::::::

0 commit comments

Comments
 (0)