You asked
Is the yongnuo 42 5mm f 1 7 ii sharp enough for portraits compared with the panasonic 42 5mm f 1 7?
The guide can't say which of these two is sharper. Its pages describe both as 42.5mm primes for Micro Four Thirds, with the Panasonic at f/1.7 and the Yongnuo also at f/1.7, and they give no sharpness results to compare. For portraits, the shared f/1.7 aperture matters more than any sharpness difference the guide can't measure. The guide's aperture and background blur section explains that a wide aperture gives sharp eyes and a soft background, and that moving your subject away from a wall often helps as much as a faster lens.
The Yongnuo YN42.5mm f/1.7M II is the budget choice. The guide calls it a cheap autofocus portrait prime for Micro Four Thirds, so it suits someone who wants a first portrait lens without spending much. You give up whatever the Panasonic offers in build and brand support, which the guide doesn't cover.
The Panasonic Lumix G 42.5mm f/1.7 is the same focal length and aperture from a major maker. Choose it if you want to buy from a known brand and don't mind paying more for that.
If you want more background blur and a thinner plane of focus, the Panasonic Leica DG 42.5mm f/1.2 opens wider. The guide's blur notes warn that at f/1.4 and wider, depth of field can be thinner than a face, so stop down slightly when shooting two people at different distances.
All three need a Micro Four Thirds body. The guide's lenses page suggests a fast standard prime as an early buy for people and low light, which fits this kind of lens.
Written by Claude from this site's pages.
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.