numpy.int64 to string

0

I read a file in pandas and I pick up the value of a cell in the EXCEL sheet

let's say

prov = lectura.iat[1,7]

tells me that prov is of type numpy.int64 with print(type(prov))

then I want to use this variable by adding it to a text string.

I do

prov_str=str(prov)

and he will not let me, the error is:

TypeError: 'str' object is not callable

I've done it many times and it always worked for me. use Python 3.6)

    
asked by Jose Miguel 17.09.2018 в 11:20
source

2 answers

0

In a previous part of the code you have redefined str with which when wanting to "cast" it is already redefined.

    
answered by 17.09.2018 / 13:15
source
0

nothing! false alarm, the solution to restart the console, ... but sometimes makes me doubt my own existence the happy python. Thanks in any case. Greetings

    
answered by 18.09.2018 в 18:00