get_dummies ran for 20 minutes and ended without result
#### CODE
My Python file was only just this:

p_csv= pandas.read_csv(("/myDir/myFile.csv"), index_col=0)
pandas.get_dummies(p_csv, prefix="myDATA_", columns="myDATA")
p_csv.to_csv("/myDir/myNew.csv")

#### Problem description
The script ran in pycharm for over 20 minutes and ended with a SIGKILL. No result.
The Shape is about (450k, 150).

After trying to get it work for over an hour I decided to just do it myself. I knew there were 14 unique strings in that column (used pandas in console for that before). So I put in 14 blank columns after the "myDATA" column and ran this Script afterwards:


p_csv= pandas.read_csv(("/myDir/myFile.csv"), index_col=0)
myDataNames = sorted(p_csv["myDATA"].unique())
1
for i in range(0,14):
    print(i)
    col = myDataIndex+ 1 + i
    p_csv.iloc[:,col] = p_csv["myData"].apply(lambda x: int(x==myDataNames[i]))

p_csv.to_csv("/myDir/myNew.csv")


It Ended in under 2 Minutes with the desired result. I am wondering why the get_dummies() method didn't work for me.


