title: Delete rows that do not contain specific text
body: <p>I have a tabular file that looks like this:</p>
  
  <pre><code>query_name      KEGG_KOs
  PROKKA_00013    NaN
  PROKKA_00015    bactNOG[38]
  PROKKA_00017    NA|NA|NA
  PROKKA_00019    K00240
  PROKKA_00020    K00246
  PROKKA_00022    K02887
  </code></pre>
  
  <p>I'm trying to create a script to go through and delete the entire row if column 2 ('KEGG_KOs') does not begin with 'K0'. I'm trying to create an output of:</p>
  
  <pre><code>query_name     KEGG_KOs
  PROKKA_00019    K00240
  PROKKA_00020    K00246
  PROKKA_00022    K02887
  </code></pre>
  
  <p>Previous responses have referred people to pandas DataFrame but I've had no luck using those responses to help. Any would be greatly appreciated, cheers.</p>
  
  <p>I had tried (but this only isolates a specific K0 line.</p>
  
  <pre><code>df = pd.read_csv("eggnog.txt", delimiter="\t", names=["#query_name", "KEGG_KOs"])
  print(df.loc[df['KEGG_KOs'] == 'K00240'])
  </code></pre>