Edit: This turned out to be an issue with the error message when setting a single column using a DataFrame with no columns; see #55956 (comment) - rhshadach Pandas version checks I have checked that this issue has not already been report...
This said, as a consequence of "fixing"#16823(Irespectfully disagreeon the fact that it was a bug in the first place), your code will now raise an error in the git version of pandas (but why not forbidpd.DataFrame({'a' : 3}, index=[])too then for coherence?) ...