Software Open Access

detect-delimiter software project

McNamara, Timothy S

Citation Style Language JSON Export

  "publisher": "Zenodo", 
  "DOI": "10.5281/zenodo.1323186", 
  "language": "eng", 
  "title": "detect-delimiter software project", 
  "issued": {
    "date-parts": [
  "abstract": "<p>Data sharing and research collaboration is hindered when messy data is released. Despite this, it still exists. detect-delimiter aims to provide tools with an option for inspecting the header of a text file and checking the actual delimiter used, rather than blindly believing the file extension.</p>\n\n<p><strong>Usage</strong></p>\n\n<p>The detect_delimiter module exposes the detect() functinon, which takes a str as input and returns a delimiter.</p>\n\n<pre><code class=\"language-python\">&gt;&gt;&gt; from detect_delimiter import detect\n&gt;&gt;&gt; detect(\"looks|like|the vertical bar\\n is|the|delimiter\\n\")\n'|'</code></pre>\n\n<p>When detect() doesn&#39;t know, it returns None:</p>\n\n<pre><code class=\"language-python\">&gt;&gt;&gt; text = \"not really any delimiters in here.\\nthis is just text.\\n\"\n&gt;&gt;&gt; detect()</code></pre>\n\n<p>It&#39;s possible to provide a default, which will be used in that case:</p>\n\n<pre><code class=\"language-python\">&gt;&gt;&gt; detect(text, default=',')\n','</code></pre>\n\n<p><br>\nBy default, detect() will prevent avoid checking alpha-numeric characters and the period/full stop character (&quot;.&quot;). This can be adjusted via the blacklist parameter.</p>\n\n<p>If you believe that you know the delimiter, it&#39;s possible to provide a list of possible delimiters to check for via the whitelist parameter. If you don&#39;t provide a value, [&#39;,&#39;, &#39;;&#39;, &#39;:&#39;, &#39;|&#39;, &#39;\\t&#39;] will be checked.</p>", 
  "author": [
      "family": "McNamara, Timothy S"
  "note": "This Python package can also be installed via \"pip\": \"pip install detect-delimiter\".", 
  "version": "0.1.1", 
  "type": "article", 
  "id": "1323186"
All versions This version
Views 112112
Downloads 2323
Data volume 71.3 kB71.3 kB
Unique views 101101
Unique downloads 2222


Cite as