0

I have a question about converting DataFrame into np.array.

I converted DataFrame into array through the code below, but all the figures in df changed their position of the decimal points after converting. How can I save the format of them?df contains int64 and float64.

 import os
 import pandas as pd 
 import numpy as np

 df = pd.read_csv("***.csv", header=0, parse_dates=['date'])

 xset = np.array(df)

※As output of df 124.63 1215.93 20.56

※As output of xset ([[ 1.24630000e+02, 1.21593000e+03, 2.05600000e+01, ...,

Brian
  • 2,163
  • 1
  • 14
  • 26
companyyy
  • 29
  • 1
  • 2

1 Answers1

0

you can use np.array(df.values)

My3
  • 140
  • 1
  • 10