Indexes can either be created explicitly or you can let pandas create them implicitly. Explicit creation takes place when you assign the index using the index parameter of a constructor.
The following code demonstrates by first creating a DatetimeIndex independently.
You can use this index on its own or associate it with a Series or DataFrame. This code creates a DataFrame utilizing the index.
An index can also be directly assigned to an existing DataFrame or Series by setting the .index ...