Skip to content

Instantly share code, notes, and snippets.

@ochilab
Created November 16, 2020 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ochilab/aaaff9298b6f519b15205178ee18ad9e to your computer and use it in GitHub Desktop.
Save ochilab/aaaff9298b6f519b15205178ee18ad9e to your computer and use it in GitHub Desktop.
データフレームのクラスをnumpyArrayに変換する
#reshapeする
x = df.iloc[:, i]
x=x.values.reshape(-1,1)
#または、np.arrayで変換する
x = np.array(df.iloc[:, i])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment