convert two numpy array to pandas dataframe 1

convert two numpy array to pandas dataframe

import pandas as pd
import numpy as np
images = np.array(images)
label = np.array(label)
dataset = pd.DataFrame({'label': label, 'images': list(images)}, columns=['label', 'images'])

Here is what the above code is Doing:
1. We are creating a dataframe with two columns, label and images.
2. We are passing the label and images list to the dataframe.
3. We are naming the columns as label and images.

Similar Posts