[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Undefined array key 34
[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Trying to access array offset on value of type null
Answer Happy • 0 OHN m 1 2 3 4 ships_to_country_ids [209, 0, 150, 79, 175] [79, 167, 290, 284, 209, 61, 58, 74, 105, 55, [70, 118, 146,
Page 1 of 1

0 OHN m 1 2 3 4 ships_to_country_ids [209, 0, 150, 79, 175] [79, 167, 290, 284, 209, 61, 58, 74, 105, 55, [70, 118, 146,

Posted: Fri Jul 01, 2022 5:34 am
by answerhappygod
0 Ohn M 1 2 3 4 Ships To Country Ids 209 0 150 79 175 79 167 290 284 209 61 58 74 105 55 70 118 146 1
0 Ohn M 1 2 3 4 Ships To Country Ids 209 0 150 79 175 79 167 290 284 209 61 58 74 105 55 70 118 146 1 (30.78 KiB) Viewed 52 times
Dataframe with index, and the a string with country numbers itships to.
I want to add a new column, which gives the sum of the countryit ships to. So for the first row, the new column should give 5(because [209, 0, 150, 79, 175].
But if i try to print the length of the first row, it gives 22 (by print(len(df['ships_to_country_ids])) ) as it is a string, andnot a list.
0 OHN m 1 2 3 4 ships_to_country_ids [209, 0, 150, 79, 175] [79, 167, 290, 284, 209, 61, 58, 74, 105, 55, [70, 118, 146, 90, 151, 79, 207, 91, 71, 215, [175, 61, 80, 220, 219, 204, 56, 103, 79, 128,. [209, 167, 127, 0, 203, 61, 131] [120, 0] 2... [0, 209] [0, 209] [209, 68, 91, 0] 9993 9994 [155, 151, 99, 243, 278, 144, 127, 180, 207, 9996 9998 9999 1