Ask Your Question

Revision history [back]

'builtin_function_or_method' object has no attribute 'split'

import matplotlib.pyplot as plt %matplotlib inline import numpy as np file = 'IV meas -1.50E+0 V to 1.50E+0 V PHY 364 Practical_Dark_temp_25.57oC_Intensity_0.000suns -light OFF- 0 sec wait at 0 Volt.txt' f=open(file,'r') delimiter = ','

line=f.readline() while (line != ''): data=line.split(delimiter) V1L.append(float(data[0])) I1L.append(float(data[1])) line=f.readline

each line in the txt file is of the form -1.50000E+0,-3.22013E-3

'builtin_function_or_method' object has no attribute 'split'

Code:

import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
file = 'IV meas -1.50E+0 V to 1.50E+0 V PHY 364 Practical_Dark_temp_25.57oC_Intensity_0.000suns -light OFF- 0 sec wait at 0 Volt.txt'
f=open(file,'r')
delimiter = ','

','

line=f.readline() while (line != ''): data=line.split(delimiter) V1L.append(float(data[0])) I1L.append(float(data[1])) line=f.readline

line=f.readline

each line in the txt file is of the form -1.50000E+0,-3.22013E-3form

-1.50000E+0,-3.22013E-3