0

I've saved some data of mine in a csv file using pandas (from a dict) and if I'm looking at it or printing it I'm getting 3 dots in the middle of the information. I think it might be because the string is too long.

Example:

[-1.19583108e-02,  7.44251342e-03, -1.35046719e-02, ..., 1.01258847e-03, -4.75816538e-03,  1.09870630e-02]

When it should've been about 300 different numbers.

Is there any solution?

Explanation: Let's say I have a numpy array of 300 entries (we'll call it arr). I want to store this array in a csv file under the header of test. So I read the csv file (using pd.read_csv function) and try to get this array by using: df['test'].iloc[0]. Now even if I'm using the commands that I was suggested in the answers - I still get dots (because I think it was saved this way). What I actually want to do is to eval this string to get an actual numpy array and use it as an array, but what I get instead is this: error

I figured the ellipsis object is the 3 dots I don't want to get.

Nikita
  • 93
  • 7

1 Answers1

1

Just add the following in the beginning of your code:

import sys
numpy.set_printoptions(threshold=sys.maxsize)

Edit:

Try:

df.loc[df[0] != ...]
U13-Forward
  • 69,221
  • 14
  • 89
  • 114