0

Hi I am a bit stuck creating a DataFrame from two column vectors:

import numpy as np
import pandas as pd
df = pd.DataFrame( {'col1':np.arrange(0,11,1)}, {'col2':np.arrange(0,11,1)} )

I always get the error "ValueError: Shape of passed values is (11, 1), indices imply (1, 1)"
But if I create them both individually it works WHY?

df = pd.DataFrame( {'col1':np.arrange(0,11,1)})
MadMax
  • 143
  • 4
  • 14

0 Answers0