title: Best way to handle path with pandas
body: <p>When I have a <code>pd.DataFrame</code> with paths, I end up doing a lot of <code>.map(lambda path: Path(path).{method_name}</code>, or <code>apply(axis=1)</code> e.g:</p>
  
  <pre><code>(
      pd.DataFrame({'base_dir': ['dir_A', 'dir_B'], 'file_name': ['file_0', 'file_1']})
      .assign(full_path=lambda df: df.apply(lambda row: Path(row.base_dir) / row.file_name, axis=1))
  )
    base_dir file_name     full_path
  0    dir_A    file_0  dir_A/file_0
  1    dir_B    file_1  dir_B/file_1
  </code></pre>
  
  <p>It seems odd to me especially because <code>pathlib</code> does implement <code>/</code> so that something like <code>df.base_dir / df.file_name</code> would be more pythonic and natural.</p>
  
  <p>I have not found any <code>path</code> type implemented in pandas, is there something I am missing?</p>
  
  <h3>EDIT</h3>
  
  <p>I have found it may be better to once for all do sort of a <code>astype(path)</code> then at least for path concatenation with <code>pathlib</code> it is vectorized:</p>
  
  <pre><code>(
      pd.DataFrame({'base_dir': ['dir_A', 'dir_B'], 'file_name': ['file_0', 'file_1']})
      # this is where I would expect `astype({'base_dir': Path})`
      .assign(**{col_name:lambda df: df[col_name].map(Path) for col_name in ["base_dir", "file_name"]})
      .assign(full_path=lambda df: df.base_dir / df.file_name)
  )
  </code></pre>