tags: python data analysis pandas
I will guess what I have to do if I look at the code below. . . It's so simple ~
a = pd.DataFrame({'one':[1,2,3,4,5],'two':['q','','e','','t'],'three':['','ss','',11,'gg']})
# b = []
for i in len(a):
print(i)
Then report an error:
Here INT is an integer variable, so it cannot be iterated. . .
Therefore, the code is changed:
a = pd.DataFrame({'one':[1,2,3,4,5],'two':['q','','e','','t'],'three':['','ss','',11,'gg']})
# b = []
for i in range(len(a)):
print(i)
OK is OK. . .
I got an error when doing iterative calculation in Python3 TypeError: 'int' object is not iterable Translated is that the int object is not iterable The wrong code is because of the left T...
Solve TypeError:'int' object is not iterable Problems encountered when playing cnn neural network for the first time Solution: Add a range to the label in the for loop of the code. The effect is as fo...
I don't know what the hell this is, it may be a version problem. Can't play. . . You can just try some of Ali's projects. Recently, people still use 1.3. Can you imagine? ? For Video Recommenda...
https://blog.csdn.net/dataspark/article/details/9953225 [Analysis] Generally, the function return value is none and is assigned to multiple variables. [Case] Define the following functions When using ...
The reason is that the input_shape input format is wrong There should be a comma Complete code:...
When I was working today, I encountered such a problem: the string was transferred to tuple. He was scattered, which caused me to write Excel in the following situation that I did not want, and then t...
Problem Description Use the following code to variablesa, bAssign the same value to report an error: Cause Analysis It should not be useda, b = 1The way is assigned, then the assignment method is chan...
TypeError: cannot unpack non-iterable int object An error is as follows Cause Analysis An error is as follows Cause Analysis The function returns a number of inconsistencies, check the number of retur...
Code The result appears :for i in number_feature: TypeError: 'int' object is not iterable error The reason for the error is because in Python, integer (int) data cannot be used directly for iteration,...
usecols : int or sequence, optional Which columns to read, with 0 being the first. For example, usecols = (1,4,5) will extract the 2nd, 5th and 6th columns. The default, None, results in all columns b...