'Matrix 0th row 0th column reading "Dog" instead of "Target"

I am trying to append certain strings to a matrix. One that reads "Target" on the 0th row 0th column. And one that reads "Dog" on the 0th column 1st row downwards to the last row of the matrix.

My initial matrix looks like: enter image description here

I have a small issue with the following program:

import numpy as np
import pandas as pd

main=pd.read_csv('C:/Users/Jonas/Desktop/testfile/biggertest.csv', header=None)

target_col = ['dog'] * main.shape[0]
main.insert(loc = 0, column = 'target', value = target_col)

This creates a new matrix that looks like this: enter image description here

Instead of: enter image description here

I'm wondering what I need to change to make this happen?

Cheers.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source