Hi @Abhimanyu ,
Yeah Actually in spark, '.'(dot) in columns is used for StructType by which the nested object can be accessed.
But definitely You can rename thE columns dynamically whichever has '.' in it.
Attached few screenshots for your reference that demonstrates the dropna(how='all') functionality for '.' columns without manual work


CODE FOR YOUR REFERENCE
cols = []
for col in df.columns:
if '.' in col:
renamedCol = col.replace('.','_')
cols.append(f"`{col}` as {renamedCol}")
continue
cols.append(col)
df = df.selectExpr(*cols)