In a large bowl, mix the grated sweet potato and onion with beaten eggs, flour, salt, and pepper until well combined.
Spoon about 3 tablespoons of the sweet potato mixture into the hot oil, flattening it into a pancake shape with a spatula.
Fry until golden brown and crispy, about 3-5 minutes per side. Transfer to a paper towel-lined plate to drain excess oil.