The tweak is to use standard hidden classes like slds-table–header-fixed_container to create the table. Second important class is slds-cell-fixed which is applied to div inside th element. These classes are the part of Lightning Design System. There is no documentation available on Data Tables till now.
The github feature request for this functionality can be found here Feature Request: Fixed Header Row for slds-table
You can find the fix and working example here:
The sample code is available here: Data tables with fixed header row. Since the classes are not documented(may be part of coming release) so the solution can be working up to 2.3.3 version. I tested the solution on IE11, Firefox and Chrome browsers.
Found similar question on Stackexchange
Any type of feedback is welcome 🙂
#Lightning Design System Version used 2.3.2