In the present work, the effect of doping on electronic properties in bulk purified and filled arc-discharge single-walled carbon nanotubes samples is studied for the first time by in situ Raman spectroelectrochemical method. A major challenge to turn the potential of SWCNTs into customer applications is to reduce or eliminate their contaminants by means of purification techniques. Besides, the endohedral functionalization of SWCNTs with organic and inorganic materials (i.e. metal halides) allows the development of tailored functional hybrids. Here, we report the purification and endohedral functionalization of SWCNTs with doping affecting the SWCNTs. Steam-purified SWCNTs have been filled with selected lutetium(iii) halides, LuCl3, LuBr3, LuI3, and sealed using high-temperature treatment, yielding closed-ended SWCNTs with the filling material confined in the inner cavity. The purified SWCNTs were studied using TGA, EDX, STEM and Raman spectroscopy. The lutetium(iii) halide-filled SWCNTs (LuX3@SWCNTs) were characterized using STEM, EDX, Raman spectroscopy and in situ Raman spectroelectrochemistry. It was found that there is a charge transfer between the SWCNTs and the encapsulated LuX3 (X = Cl, Br, I). The obtained data testify to the acceptor doping effect of lutetium(iii) halides incorporated into the SWCNT channels, which is accompanied by the charge transfer from nanotube walls to the introduced substances.