You can create namespaces in the Namespace Editor as well as when you reference or import a file into your scene. When you create a namespace during file referencing or importing, the file name is used as the namespace by default.
After you create a namespace you can edit it using the Namespace Editor. See Edit namespaces.
Create namespaces using the Namespace Editor
Create namespaces during file referencing or importing
When you are creating a file reference or importing a file, you can create the namespace used by the referenced and imported objects.
To create a namespace during file referencing or importing
By default, the new namespace uses the filename to create unique names for the referenced object's namespace.
The file is referenced into the parent scene. If you open the Outliner, you can see that the object names for the referenced objects are all prefixed with either the referenced file's name or your namespace text string.
You can edit namespaces using the Namespace Editor, Reference Editor or by using MEL commands. For more information see Namespace Editor Overview, Edit namespaces, Reference Editor overview, and Work with file references.