Skip to main content
Agrego un ejemplo que reproduce el error del OP
Origen Enlace
Patricio Moracho
  • 61.1k
  • 12
  • 42
  • 72

Al final de la última variable existe texto extra y no sube el archivo, se presenta el siguiente error:

Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.

A modo de ejemplo agrego un archivo CSV que genera un error similar

Name,Company,Serving,Calories,Fat,Sodium,Carbs,Fiber,Sugars,Protein
AppleJacks,K,1,117,0.6,143,27,0.5,15,1
Boo Berry,G,1,118,0.8,211,27,0.1,14,1
Cap'n Crunch,Q,0.75,144,2.1,269,31,1.1,16,1.3
Cinnamon Toast, Crunch,G,0.75,169,4.4,408,32,1.7,13.3,2.7

Y la carga la realizamos mediante:

df <- fread(file="test.csv")

Al final de la última variable existe texto extra y no sube el archivo, se presenta el siguiente error:

Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.

Al final de la última variable existe texto extra y no sube el archivo, se presenta el siguiente error:

Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.

A modo de ejemplo agrego un archivo CSV que genera un error similar

Name,Company,Serving,Calories,Fat,Sodium,Carbs,Fiber,Sugars,Protein
AppleJacks,K,1,117,0.6,143,27,0.5,15,1
Boo Berry,G,1,118,0.8,211,27,0.1,14,1
Cap'n Crunch,Q,0.75,144,2.1,269,31,1.1,16,1.3
Cinnamon Toast, Crunch,G,0.75,169,4.4,408,32,1.7,13.3,2.7

Y la carga la realizamos mediante:

df <- fread(file="test.csv")
se añadieron 6 caracteres en el cuerpo
Origen Enlace
Shaz
  • 29.2k
  • 18
  • 40
  • 61

Al final de la última variable existe texto extra y no sube el archivo, se presenta el siguiente error Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.:

Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.

Al final de la última variable existe texto extra y no sube el archivo, se presenta el siguiente error Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.

Al final de la última variable existe texto extra y no sube el archivo, se presenta el siguiente error:

Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.

Origen Enlace

error al subir con fread

Al final de la última variable existe texto extra y no sube el archivo, se presenta el siguiente error Expecting 26 cols, but line 15475 contains text after processing all cols. Try again with fill=TRUE. Another reason could be that fread's logic in distinguishing one or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes has failed. If quote='' doesn't help, please file an issue to figure out if the logic could be improved.