No, you cannot keep just two zebra danios. Zebra danios are schooling fish, so they need to live in groups to feel happy and safe.
Even though keeping two is better than keeping a single zebra danio, two fish aren’t enough to form a school. With only two, your zebra danios will become stressed, lose their appetite, become anxious, contract diseases, or even display aggression towards other tank inhabitants.
You should keep at least five zebra danios together so that they can form a proper school and thrive.
You must also ensure the tank is conducive to the danios’ active nature. Each zebra danio needs at least two gallons of water to swim freely, so you’ll need a 10-gallon tank or bigger for a small school of zebra danios.