Answer: Refried beans are not keto, as they contain an enormous amount of carbs.
Each serving of refried beans (1 cup) contains 20.3 g of net carbs. Sadly, that's far too carb-heavy to fit the keto diet.
As a rule of thumb, beans do not fit the keto diet. They tend to be high in starches and low in fat, the opposite of what you want on keto.
If you need a bean to satisfy your bean craving, black soy beans are a popular keto-friendly bean. They're high in protein, rich in antioxidants, and only contain 2 g of net carbs per cup.