Importing existing users into a new Drupal site
It sounds like you're after the Feeds module! It supports mapping fields sources to destinations, and will auto-create entities in some cases.

After installing &amp; enabling the module, you'll want to create a Feeds Importer (under Structure) and go from there. Navigate to /import to upload a CSV file to a feeds importer for processing.

There's a sandbox module Drush Feeds Import that should allow you to run some of this from the command line if necessary.

Check out:


  The site builder's guide to Feeds:
  
  https://www.drupal.org/node/622698


If the stock Feeds modules don't quite solve your problem, you could use the Feeds API to define your own processing class that manipulates and inserts the data into the new site.