Autodetect Presence of CSV Headers in a File

后端 未结 6 1535
心在旅途
心在旅途 2020-12-25 13:23

Short question: How do I automatically detect whether a CSV file has headers in the first row?

Details: I\'ve written a small CSV parsing engine th

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-25 13:43

    This article provides some good guidance:

    Basically, you do statistical analysis on columns based on whether the first row contains a string and the rest of the rows numbers, or something like that.

    http://penndsg.com/blog/detect-headers/

提交回复
热议问题