One writes the electronic configuration in terms of shells, spdf subshells, orbitals, and spin of electrons. There are exceptions to principles we know. How does one confirm that the way of writing is correct? How did scientists understand the exceptions in case of nobium and platinum in electronic configuration? Is it possible to take an atom and find which shell its electrons are in? How did this spdf electronic configuration (along with exceptions) be first understood.
I have discussed this problem once in the past with an Italian colleague, teaching in Palermo University, and who was in charge of training the Italian team at the International Chemistry Olympiad. I remember he told me that this order can be established by plotting the square root of the successive ionization potentials of any atom versus its atomic number. Of course there is one point for H, two for He, three for Li, etc. If you report these √I values versus the atomic number Z, you will find that all highest values (relative to last $1$s electron) are steadily increasing, of course. But these points remain alined across the page. Likewise, all next to highest values (also relative to $1$s) are alined, and surprisingly the slopes of both lines are equal. The first line starts at H, and the second at He. But they are parallel, after my Italian colleague.
Now if you consider the next but two highest √I values, the curve starts at Li, and the corresponding points ($2$s) are also alined through the diagram, with a slope which is nearly the same as the first two curves. Likewise the points corresponding to the next but three values (starting at Be) are alined and the line is parallel to the preceding line.
Something new happens with the next points. If you consider the fifth √I values by decreasing numerical order, these points start with Boron. And they are alined across the diagram. They correspond to $2$p electrons. New surprise : the points are still alined. But the slope of this line is much smaller than before. The slope seems to be typical of p electrons.
If you join the sixth √I values, stqrting with Carbon, the curve is still a line, with the same slope typical for p electrons. Same thing for the $7$th, $8$th, $9$th and $10$th electron. All lines are parallel.
First difficulty occurs with the $11$th √I values, starting with Na. The curve joining these points is much steeper than for the preceding electrons. It has the same slope, typical of the $1$s and $2$s electrons. So, this line cuts preceeding lines. As a consequence, when studying the points through Mg, Al, Si, etc., it is not easy to decide which √I value belongs to what.
I have not done it myself, but my colleague told me that this job may be carried out through all the periodic table, and that it is possible to recognize a bundle of steep lines for all s electrons, another bundle of not so steep lines for p electrons, another bundle of still less inclined lines for d electrons, etc. and the same with f electrons.
Apparently, this job explains why there are irregularities in the electronic configurations through the periodic table.
If some reader will try to check this statement, I would be pleased to hear of his job.