Dls course week2 dataset

I was trying to open the dataset in week 2 to know the data( column names). Is there any way to read the data?

The dataset is stored in an h5 format file. They give you the code in the load_dataset function to read that file into memory and create numpy objects based on the data. You can see the source for load_dataset by clicking “File → Open” and then opening the file lr_utils.py. There is a topic on the FAQ Thread about that process in general.

If you want to learn more about h5 files and how to deal with them, that is beyond the scope of this course, but the web is a rich source for that kind of information. Just google “access h5 file python” if you want more information.

Thanks. But if I want to know the column names how can I read it?

Python code to read the column name in data

import numpy as np
import h5py
train_dataset= “Datasets/train_catvnoncat.h5”
f = h5py.File(train_dataset, ‘r’)

I ran this code and got the result as .

Where does it say that the columns have names? This is h5 not XLS, right?