NEW YORK — There’s a rule in politics: No silly hats. But here stood Andrew Yang, wearing a hairnet, and wearing it proudly.

“They gave it to me and I put it on,” he explained.

It was March, and the early front-runner in New York City’s mayoral race had come to Xi’an Famous Foods in Chinatown — trailed, as he often is, by a throng of cameras — to hand-pull noodles in a distinctly Andrew Yang way: inexpertly but full of enthusiasm, with a lot of thumbs-ups to the crowd and dancing for joy when he stretched the dough right.

Two employees of the local fast-casual chain had been punched in the face on the street, part of a wave of anti-Asian violence of which New York City has been an epicenter and the site of some of the most brutal attacks. Yang, a son of Taiwanese immigrants, was pulling noodles in solidarity. And for those wandering in, it was a thrill to see him: the blissfully un-self-conscious amateur with a hairnet clinging to his scalp like a baby alien.

"Oh, my God!" gasped Ariel Chi, a Taiwanese American pharmaceutical sales rep who recognized him as she was ordering lunch. "Is Andrew Yang going to make my food?"

He was not. (Be thankful, Ariel.)

But with four weeks to go until the primary, New Yorkers are facing a different question: Is Andrew Yang going to be my mayor? And does he have any idea what he’s doing?

Much like pulling noodles, or running for president, Yang, a 46-year-old former test-prep CEO and nonprofit entrepreneur and a lightning rod for the Asian American community (many of whom didn’t like the “MATH” hats from his presidential campaign), entered this race with more enthusiasm than know-how. He has been spinning his lack of government experience as a plus. “I’m going to suggest something that’s sort of funny,” Yang told The Washington Post in one of several chats on the campaign trail. “I think my behavior clearly indicates that it’s not like I’ve been scheming to get in the mayor’s office for the last X years.”

New York mayoral candidate Andrew Yang pulled noodles at Xi'an Famous Foods in Chinatown on March 5. (Jada Yuan/The Washington Post)

In a field of 13 Democrats vying to succeed Bill de Blasio, New York’s term-limited Democratic mayor, Yang finds himself at or near the front of the pack. In the latest available period of fundraising tracked by the city’s Campaign Finance Board, Yang vastly outpaced his closest rivals — Brooklyn Borough President Eric Adams, City Comptroller Scott Stringer, former sanitation commissioner Kathryn Garcia and former civil rights attorney Maya Wiley — in small donations from city residents. If he wins, he will be the city’s first Asian American mayor and only the second non-White person to hold that office, helping the city recover from a pandemic whose origins in China have added to anger against people who look like him and his relatives, with some getting beaten up, having their fingers bitten off and even getting shoved onto subway tracks.

“I’ve certainly had the feeling that many Asian Americans walking the streets of New York have gotten over the last number of months, where before, frankly, I might have felt like I blended into the woodwork,” he told The Post. “And now it seems like people notice that I’m there, but they’re not excited for me to be there.”

Yang’s campaign has entered a critical stage. The spotlight found him early due to his national profile, giving the news media plenty of time to illuminate his negatives as well as his positives. His gaffes showing a lack of knowledge about city services are not always charming. And while he has proved to be an able cheerleader for New York’s imminent return to mythic glory, that message is far less potent now that many people are vaccinated and the city has officially reopened.

But, as Manhattan voter Jon Giman, 62, says, “there’s just something about Andrew Yang.” Something that might have him on a wavelength with voters at this psychologically complex moment. You can see it in the cheers and high-fives and hugs — even tears! — Yang encounters on the street. New York City is coming out of a horrifying year: ­33,000 residents are dead, 630,000 jobs are gone and the budget is facing a $4 billion shortfall.

Now comes Yang with his amateur’s confidence, a natural hype man who couldn’t wait to begin campaigning in person; he did so earlier than his opponents, and he wound up catching covid-19 in February. He came out the other side running and spent the spring having an absolute blast celebrating every aspect of reopening the city.

“It’s a little bit like after 9/11 when Bloomberg became mayor,” says Alicia Glen, former deputy mayor of housing under de Blasio. Back then, the city picked a businessman who was new to politics. Yang doesn’t have Mike Bloomberg’s billions, but he does have an everyman affection for things normal New Yorkers love to do.

There’s Yang, making matzoh! Riding the Cyclone on Coney Island! Shooting bricks, er, hoops on West Fourth Street! Cheering on the Knicks! And the Nets! And the Mets! And the Yankees, even though he’s a Mets fan! In April, he turned up at a club to introduce Dave Chappelle (who had endorsed Yang in the presidential race) and herald the return of stand-up comedy in the city. He has supported making permanent the few good things that came out of pandemic life, like to-go drinks and expanded outdoor restaurant seating. And he has gained support in the most-neglected pockets of the city, like Caribbean sections of Queens and Latino communities in the Bronx.

“That pro-New York exuberance is very appealing to a city that’s licking its wounds,” Glen says. “Part of the reason why people really dislike Bill de Blasio is he never conveyed a real sense of love and excitement for the city. He never went out to the theater or dinner. Yang is the perfect opposite of Bill de Blasio.”

Yang knew New York City first as a destination. He grew up primarily around White people in a Westchester County suburb, and he would take the train into the city with his brother. His parents, a physicist and a systems administrator/artist, had moved to New York state after meeting at the University of California at Berkeley. During the presidential campaign, Yang showed off photos of himself as a teenager with floppy skater hair and wearing a trench coat. His favorite bands were the Smiths and the Cure, because of course. He is as Gen X as it gets: analog childhood, digital adulthood.

His education was East Coast elite: Phillips Exeter Academy, Brown University — and Columbia Law School, which is how he went from being an occasional visitor to a New York City resident. He has now lived in Manhattan for 25 years — although, he admits, he has never voted in a mayoral election. His wife, Evelyn, is a Chinese American raised in Bayside and Flushing, Queens, and one of their two young boys goes to public school here. (His other son is on the autism spectrum and attends a private school; Yang is an advocate for special-needs education.)

Despite these bona fides, he occasionally comes off like he doesn’t know the city. Infamously, Yang shot an early campaign video in a “bodega” that looked like a brightly lit supermarket, with nary a bodega cat in sight. He tweeted that he was “On the A train Bronx bound”; the A train doesn’t go to the Bronx. Last week, he told the comedian Ziwe that his favorite subway station is Times Square and blanked momentarily when asked to name his favorite Jay-Z song. Yang slammed a subsequent New York Daily News cartoon that depicted him as a Times Square tourist, calling it a “racialized caricature” that cast him as a “perpetual foreigner.”

New York mayoral candidate Andrew Yang met and took photos with voters in New York on March 5. (Jada Yuan/The Washington Post)

In a city built on wacky ideas and raging ambition, though, Yang is billing himself as the candidate with the biggest ideas of all. As a presidential candidate, his big idea was to pay every American a “universal basic income,” or UBI, of $1,000 per month. The city can’t afford UBI, but he has pledged to give $2,000 to the poorest 500,000 New Yorkers and to set up a “People’s Bank” so they won’t lose a portion of their payouts to check-cashing businesses. Yang also wants to build a version of Manhattan’s popular High Line park in Queens, turn hotels into affordable housing and require NYPD officers to live in the five boroughs (51 percent of them don’t, according to 2020 data). He often says how dumb he thinks it is that the mayor doesn’t have control of the city’s buses and subway, which are the responsibility of the state-run Metropolitan Transit Authority.

Is any of it realistic? Debatable. (Experts point out that he’ll get the MTA over Democratic governor Andrew M. Cuomo’s dead body.) Voters, though, seem to enjoy Yang as a “yes” man who sees possibilities where others see problems.

“I think New York needs someone who thinks outside the box,” said Denise Barlow, 63, a retired Pfizer executive who lives in Stuyvesant Town, a massive housing complex in Manhattan where Yang collected signatures to get on the ballot in March.

“People say he’s not from New York, and I don’t care,” said Sudeen Burgher, a 38-year-old nursing assistant, after meeting Yang outside a grocery store in southeastern Queens. “We need smart people in there, and I think he understands the issues.”

“I always thought he was from New Hampshire. He talks so much about being an outsider,” said Karlin Chan, a 64-year-old activist who saw Yang at Xi’an Famous Foods.

“He doesn’t have to know New York politics,” said Rosalyn McKinney, a 63-year-old homemaker from Harlem who gasped when Yang came out of her subway station. “He’ll get it in time.”

It’s not clear at the moment whether time is on his side. His competitors have picked up momentum, particularly Adams and Garcia. For Yang, what once looked like an express train bound for Gracie Mansion may be losing speed before its final stop.

Or maybe his train doesn’t go there at all.

Here's an incomplete list of all the reasons Andrew Yang's critics say he shouldn't be mayor: He has never held public office. He has never voted in a mayoral election. When the pandemic hit, he fled the city to a second home, in New Paltz. He didn't exactly distinguish himself in the business world; his jobs-creation start-up, Venture for America, aimed to create 100,000 jobs and wound up with fewer than 4,000, according to a Vox investigation.

He tweeted about cracking down on unlicensed street vendors, apparently unaware that a 2019 video of a churro lady getting arrested on the subway sparked protests. He alienated a prominent LGBTQ group by referring to “your community” and talking a lot about gay bars. He had to apologize to his campaign volunteers for an “overly simplistic” pro-Israel tweet (Yang’s words) as violence erupted in Gaza; the volunteers were upset about Yang’s failure to acknowledge the pain of Palestinians, who saw many more casualties.

Yang’s blunders might be understood as an iterative process in which the candidate is beta-testing himself and his ideas in real time. He has an entrepreneur’s mind-set of throwing a bunch of ideas in the water and seeing what floats. Failures aren’t cause for alarm; they’re a chance to recalibrate.

But with voters, you only get one chance to make a first impression. “I don’t trust him, because he’s not from New York City and, like, the whole bodega thing. I know what a bodega is,” said Billy Rivera, a third-grade teacher who watched Yang speak to a group of volunteers outside Stuyvesant Town. “It’s a lot of little snafus with Andrew, and it’s like, ‘Are you ready for the city?’ ”

“I think in his zeal to appear young and spontaneous and whatever, he also sometimes sounds like an idiot,” says Glen, the former deputy mayor who got in a Twitter debate with Yang over his proposal to put a casino on Governors Island to fund direct-cash payments to the poor. “He gets out in front of himself with his big ideas, and he just sounds sometimes like he doesn’t understand the basic lay of the land.”

Gracie Mansion’s next occupant will inherit not just the aftermath of the pandemic shutdowns but also the tensions that arose after the murder of George Floyd by a Minneapolis police officer. Yang has been trying to thread a needle on crime and policing — one of the biggest issues in this campaign with shootings and anti-Asian hate crimes on a steep rise (up 54 and 73 percent, respectively, from January to May).

New York mayoral candidate Andrew Yang rode the subway on April 5 to show solidarity against the subway attacks on Asian Americans and Pacific Islanders. (Jada Yuan/The Washington Post)

In the wake of what appeared to be racially motivated attacks on Asian New Yorkers, Yang said he wanted to “fully fund the [NYPD’s] Asian Hate Crimes Task Force.” Black Lives Matter protesters responded by calling him “pro-cop”; when he showed up at a memorial bike ride for Daunte Wright, the 20-year-old Black man shot dead in Minnesota by a White police officer, they told him to go home. At a rally in the aftermath of mass shooting in Atlanta that left six Asian spa workers dead, Yang’s emotional speech about the invisibility he felt growing up as an Asian American was briefly drowned out by chants of “Defund the police.”

Last week, in Brooklyn, a heckler holding a sign for one of his opponents interrupted Yang’s outdoor news conference about overhauls to policing by shouting things like, “Andrew Yang doesn’t vote in New York City!”

“Shut up! He’s going to give us $1,000!” someone yelled from a nearby window.

“That’s not true!” the heckler shot back. “Do the math!”

Yang stood behind a lectern, chuckling as he waited it out.

“This is a very New York moment,” he observed.

During his presidential run, Yang angered some Asian Americans by playing into stereotypes, like joking about being good at math (he wore a blue "MATH" ball cap, his answer to President Donald Trump's red MAGA hat) and knowing lots of doctors. But Yang's mayoral campaign is, in many ways, a defiance of the long-held belief among Asian immigrants that the best way to get ahead in this country is by keeping your head down. He's seeking attention, refusing to blend into the background, not seeming to mind whether people think he's embarrassing himself, and sharing intimate details of his personal life.

Lately, he has been speaking vulnerably about his ethnic identity and the racism he experiences. “I remember vividly growing up with this constant sense of invisibility, mockery, disdain, a sense that you cannot be American if you have an Asian face,” he said at a Black-Asian solidarity event held by the Rev. Al Sharpton. At the rally after the Atlanta spa shooting, Yang choked up while reflecting on the people he met while campaigning in that area for Senate candidates Raphael G. Warnock and Jon Ossoff a few months earlier. When an elderly Filipina woman was beaten outside an apartment building and security guards shut the door on her, Yang said he felt like that could’ve been his mother.

Yang “has a level of direct empathy and connection that’s unique among this mayoral field,” says Jeff Le, a policy expert at the Truman National Security Project who writes often about Asian Americans in politics. “It would mean a lot to see Andrew Yang running an office with incredible responsibility representing millions of people.”

Recently, Yang earned the endorsements of the two most powerful Asian American politicians in the state, Rep. Grace Meng (D), who co-sponsored the federal Covid-19 Hate Crimes Act, and state Sen. John Liu (D), who was the first Asian American to hold a citywide office and who ran for mayor in 2013. Neither endorsement was a sure thing; Adams, a Black former NYPD officer, has spent decades cultivating relationships in the Asian American and Pacific Islander community. But when Meng joined Yang’s campaign three weeks ago, she did so as his newest co-chair, calling Yang “a friend” who had turned her from a UBI skeptic into an advocate.

Meng told The Post that she joined Yang’s campaign after months of hearing from constituents in Queens who saw him as “a positive spirit” for the city and watching him trudge to remote pockets of the outer boroughs to meet with groups “that were not necessarily politically expedient for him to meet with.” Meng also pointed out that Asian Americans make up 15 percent of the city’s population and said that “having someone like Andrew run and possibly win mayor of New York City would just continue to bring much-needed attention and resources to our community.”

She had been swayed, she said, by frequent praise of Yang she heard from her overwhelmingly Asian constituents in Queens. She believed he would keep attention on the community and that New Yorkers “know that his heart is in the right place.”

In his endorsement speech on May 24, Liu said he doesn’t always agree with Yang, and acknowledged his propensity for gaffes. But, Liu said, “he’s the most heard Asian American in the United States. And with that, he’s a bit [like] our AOC.” (Except that liberals who like Rep. Alexandria Ocasio-Cortez, a New York Democrat, tend to dislike Yang. That includes many AAPI liberals, nearly 800 of whom signed an online letter opposing Yang’s candidacy.)

At Xi’an Famous Foods, Yang spent several minutes talking with employee Quinn Zheng, 29, who had been heading home to Sunset Park when a man who had been eyeing him on the subway jumped him, beating him so hard that his glasses broke. Zheng had to take off two days of work because of bruising on his face.

Yang patted Zheng on the shoulder and then, with his permission, took his story to the media. “It helped a bit. I got all my words out and what happened to me,” Zheng told The Post. “At least someone knows, instead of me keeping it quiet.” A month later, he said, Yang was still the only mayoral candidate who had reached out.

It was a chilly morning in March, and Yang stood on the rooftop of Elsewhere, a nightclub in Bushwick, a gentrifying, converted-warehouse Brooklyn neighborhood. It was like a scene out of Mr. Hand's class in "Fast Times at Ridgemont High": Yang in his preppy overcoat and button-down, surrounded by a diverse crowd of scraggly-haired cool kids.

“I’m 46, so my nightlife days are not far behind me,” said Yang, not exactly looking like someone who had ever had nightlife days.

He had arranged a listening session with the owners of the borough’s small bars, nightclubs and music venues to see how they were surviving the coronavirus pandemic. Some had closed businesses for good. Others had reopened only to have inspectors from different agencies stopping by three times a week to levy fines, or they were finding human feces in their outdoor seating areas. The neighborhood, a magnet for young artists who were now unable to pay rent, had grown deserted and at times unsafe, with a series of women getting violently beaten in empty subway stairwells.

The crowd’s politics most likely skewed more Bernie Bro than Yang Gang, but ideology was not at center stage here. This was a group of New Yorkers convening to discuss a particular set of values — values that people seemed impressed Yang had wanted to talk about.

“You all are what makes New York City the epicenter of cool,” Yang said, and he needed them to be thriving for the city to come back. Not just as part of an economic recovery, he seemed to be saying, but because New York is supposed to be fun and weird and replete with the 24-hour dens of sin and possibility that make people dream of living here.

Yang laid out the math: 40 million fewer tourists visited New York last year than in 2019, resulting in more than half of the job losses during the pandemic. More than 300,000 people have left the city, dropping the public school population by 4 percent, which means a huge loss of state and federal funding. Other candidates might be underestimating how important nightlife is in the city’s revival, said Yang, “but I do not.”

“I think it says something that you were the first person to proactively reach out to this group to try and have a conversation about it,” said Ric Leichtung, founder of AdHoc Presents, which puts on concerts and publishes a zine.

Rachel Nelson, owner of the art space Secret Project Robot and the bar Happyfun, teamed up with Yang to speak at another nightlife event in late April, despite their ideological differences. “He actually is willing to listen to ideas,” Nelson told The Post. “He was like, ‘How do you get parties back in New York?’ ”

If he were mayor, Yang told the nightlife people, they would have the cellphone numbers of his deputies, and if they weren’t doing their jobs, they could easily go straight to him (another idea that may prove untenable in practice). He ended with the hard sell: “Please know that I’m a ‘get s--- done’ type of human . . . and I think you all are a very, very key part of whether or not we get out of this mess in a form that we’re excited about.”

In many ways, that’s the essence of Yang’s campaign: selling the idea that New York is still the center of the universe to the shaken but proud people who live here. Which might explain why “there’s just something about Andrew Yang,” as Manhattan voter Giman put it — some ineffable thing that has made his mayoral run so energizing and confounding. Yang lives here, but he can be wide-eyed about the city. He is capable of channeling the awe and enthusiasm of being a misfit teen from Omaha or an immigrant from Mozambique taking in the skyline for the first time.

For locals who are worried that the pandemic has left their home enfeebled beyond repair, that is a powerful message: Even after 25 years here, this is a man who still sees this city as a place of promise and renewal and big ideas coming true, even if some people think he’s being naive.

Yang isn’t a tourist — he just hearts New York.

Correction: An earlier version of this article incorrectly reported that Evelyn Yang is Korean American. She is Chinese American. This version has been updated.