Can your 12-year-old truant do this?

Avery Gagliano of Washington, D.C., is a straight-A student, but because she’s a piano prodigy, she misses a lot of school.

Her parents have created a lesson plan for when she’s on the road but her public school wasn’t impressed.

After she won the Grand Prix in Hartford, Connecticut, the school called the truancy officer in. It was her tenth “unexcused absence.”

Her parents gave up and pulled her out of the public school.

“We decided to home-school her because of all the issues, because it was like a punch in the gut to have to face the fight again this year,” said Drew Gagliano, her father. “We didn’t want to do this. We want to be part of the public school system. Avery has been in public school since kindergarten. She’s a great success story for the schools.”

Washington Post columnist Petula Dvorak says she’s miserable that she can’t be with her friends and that her mastery of the piano has isolated her.

It’s true that D.C. has a huge truancy problem. Last year, nearly a third of all students missed more than 10 days of school. So that’s about 15,000 kids who are doing who knows what instead of being in a classroom.

It would be immoral to enforce a truancy rule for some, but not others, right? But wait, what about Relisha Rudd, the 8-year-old who had been living in D.C.’s family homeless shelter and missed nearly 30 days of school before anyone reported her missing?

Aren’t we supposed to be tightening up on truancy enforcement to ensure that cases like that don’t happen?

Of course. But the fact is, truancy rules in the District are selectively enforced, depending on your Zip code.

The 8-year-old living in a homeless shelter and attending a school overwhelmed with transient children — where truancy can be a sign of something dangerous — racks up 30 absences before someone has the time to notice.

But over in the Other City, where some D.C. public schools are as fancy as their neighborhood, the little concert pianist is collared and the truancy police are on high alert.

School officials who are deciding to enforce the policy for some and not others, who refuse to take a holistic look at the child and her life in and outside school — whether it be at international concerts or in homeless shelters — should be held accountable for their short-sighted, stupid decision-making.