Hello,
In most cases this will delete the malware. But you can never be 100% sure. Windows 10 can't reset other partitions such as USB-drives and other hard drives.
Also some rare viruses can be in the recovery partition. The best thing to do is to do a reset with an USB-stick with the Windows...