The Solar Wind Electrons Alphas and Protons experiment on the Parker Solar Probe (PSP) mission measures the three-dimensional electron velocity distribution function. We derive the parameters of the core, halo, and strahl populations utilizing a combination of fitting to model distributions and numerical integration for $sim 100,000$ electron distributions measured near the Sun on the first two PSP orbits, which reached heliocentric distances as small as $sim 0.17$ AU. As expected, the electron core density and temperature increase with decreasing heliocentric distance, while the ratio of electron thermal pressure to magnetic pressure ($beta_e$) decreases. These quantities have radial scaling consistent with previous observations farther from the Sun, with superposed variations associated with different solar wind streams. The density in the strahl also increases; however, the density of the halo plateaus and even decreases at perihelion, leading to a large strahl/halo ratio near the Sun. As at greater heliocentric distances, the core has a sunward drift relative to the proton frame, which balances the current carried by the strahl, satisfying the zero-current condition necessary to maintain quasi-neutrality. Many characteristics of the electron distributions near perihelion have trends with solar wind flow speed, $beta_e$, and/or collisional age. Near the Sun, some trends not clearly seen at 1 AU become apparent, including anti-correlations between wind speed and both electron temperature and heat flux. These trends help us understand the mechanisms that shape the solar wind electron distributions at an early stage of their evolution.