I have created a script tool that cleans up the input feature class using pandas, through utilizing the spatial dataframe functionality. I created it months ago, and it seemed to work fine then. Coming back to it now, however, I have noticed that when saving the output feature class using the .spatial.to_featureclass() function, the feature class field names go from capital letters to lower case letters, and adds underscores to certain fields not previously containing spaces.
Examples (original => output):
SimplifiedEXAMPLEStatus => simplified_example_status
GlobalID => global_id
VIdeo_Complete => v_ideo_complete
VideoRecord => video_record
Obviously, this creates a lot of problems when trying to work with the data further. It seems like the function doesn't like when random capital letters are thrown into a field name. I tried to recreate the problem in an ArcGIS notebook and experienced the same output problem, but before running the .spatial.to_featureclass() function, I examined the dataframe and found that the fields were in proper form. So the problem seems to be occurring during the export function. I couldn't find any details online about this problem so wanted to post here to see if others have experienced this.