Nickel-based complex oxides have served as a playground for decades in the quest for a copper-oxide analog of the high-temperature (high-Tc) superconductivity. They may provide key points towards understanding the mechanism and an alternative route for high-Tc superconductors. The recent discovery of superconductivity in the infinite-layer nickelate thin films has fulfilled this pursuit. Thus far, however, material synthesis remains challenging. The demonstration of perfect diamagnetism is still missing, and understanding of the role of the interface and bulk to the superconducting properties is still lacking. Here, we synthesized high-quality Nd0.8Sr0.2NiO2 thin films with different thicknesses and investigated the interface and strain effects on the electrical, magnetic and optical properties. Perfect diamagnetism is demonstrated, confirming the occurrence of superconductivity in the thin films. Unlike the thick films in which the normal-state Hall coefficient (RH) changes signs as the temperature decreases, the RH of films thinner than 6.1 nm remains negative, suggesting a thickness-driven band structure modification. Moreover, X-ray absorption spectroscopy reveals the Ni-O hybridization nature in doped infinite-layer nickelates, and the hybridization is enhanced as the thickness decreases. Consistent with band structure calculations on the nickelate/SrTiO3 heterostructure, the interface and strain effect induce a dominating electron-like band in the ultrathin film, thus causing the sign change of the RH.