The answer to this is a resounding yes! As with just about anything there is an "it depends" element to this as well. In the most literal sense you are moving, moving is exercise and you are burning calories and getting your "cardio" in.
The degree of exercise depends on the players you are playing for and against. A "social" game is going to give you less exercise than a "competitive" game. On a Fitbit or similar device, you can tell the difference. In one example of social games lasting for 60 minutes a player burned 385 calories whereas in more competitive play the same 60 minutes might burn more than 600 calories. Compare this to 60 minutes on an exercise bike at a moderate to vigorous pace which typically burns between 175 and 200 calories.
When you compare Pickleball to going to a gym it’s no contest from a number of standpoints You are out of your house and not cooped up indoors. You are usually out in the fresh air, you are meeting new people, you are building a sense of camaraderie and in some cases even a sense of community. These can be just as important as mere physical exercise. A few games of Pickleball are way more fun that walking on a treadmill or any of the other "boring" options at your local gym. In fact, at most gyms people don't like doing the cardio machines because of the pure boredom factor! Pickleball is not boring and will have you on your toes the whole time and that is no matter the kind of game you are playing. As far as we know very few people look forward to getting on a treadmill! Having said that Pickleball and going to a gym are by no means mutually exclusive and many people combine the two to get the best of both worlds.
It should also be noted that Pickleball is a form of whole-body exercise. This game requires the use of just about every muscle in your body, including some you never even knew you had! Compare this to only moving your legs on a treadmill. Some assume that just because a Pickleball court is much smaller than a tennis court it is much less exercise because there is less running. Not true! The smaller court means less time between shots and more rapid reactions and movement. The smaller court combined with the relatively low impact also means less wear and tear on knees, hips, ankles and joints. For people who have these kinds of problems but still want a racket sport to be active, Pickleball is a very good choice.
In summary Pickleball is a great way to combine good fun and friendship with healthy exercise!