I don't know why I keep getting AttributeError: 'tuple ...
https://stackoverflow.com/questions/64255843/i-dont-know-why-i-keep-getting...08.10.2020 · It appears that the values of split_dict are tuples and not what I assume to be expected np.array's.I would recommend taking a look at what function split is returning to split_dict because it might be creating tuples instead of np.array's.. Edit: Based on what's inside function split, it's returning {0: (array([0, 2], dtype=int64),), 1: (array([1, 3, 4, 5], dtype=int64),)} to …
Tuple no attribute error - Python Forum
python-forum.io › thread-13250Then line will be a string which you can split. You could also access only the second element of the tuple - the string you want to split: 1. 2. for line in enumerate(yrs_file): (pdate,catg,amt,howp) = line [1].split (',') But in any case, I don't really see why you would need enumerate () in your code at all. Reply.
Tuple no attribute error - Python Forum
https://python-forum.io/thread-13250.html06.10.2018 · Then line will be a string which you can split. You could also access only the second element of the tuple - the string you want to split: 1. 2. for line in enumerate(yrs_file): (pdate,catg,amt,howp) = line [1].split (',') But in any case, I don't really see why you would need enumerate () in your code at all. Reply.