ES6 (ES2015) introduced the spread operator
..., which essentially dumps the contents of an array, object, and even string.
We can declare an array and use the spread operator to dump each character of the string into the array.
const dog = 'corgi' const converted = [ ...dog ] // ['c', 'o', 'r', 'g', 'i']
Revise the code and make it more robust with proper test case and check an error there before implementing into a production environment.
Final Note: Try to Avoid this type of mistake(error) in future!
see more- pandas read csv from url