Excel Substring Match Function In Python