[Pandas-dev] Drop all columns which are not normal numeric nor text values

Shaozhong SHI shishaozhong at gmail.com
Mon Nov 16 11:51:48 EST 2020


After applying myDF = json_normalize(result)

We get
brandId brandName careHome constituency
currentRatings.overall.keyQuestionRatings currentRatings.overall.rating
currentRatings.overall.reportDate currentRatings.overall.reportLinkId
currentRatings.reportDate dormancy ... providerId region registrationDate
registrationStatus regulatedActivities relationships reports specialisms
type uprn
0 BD510 BRAND MACC Care Y Birmingham, Northfield [{u'reportDate':
u'2020-10-01', u'rating': u'R... Requires improvement 2020-10-01
1157c975-c2f1-423e-a2b4-66901779e014 2020-10-01 N ... 1-101641521 West
Midlands 2013-12-16 Registered [{u'code': u'RA2', u'name': u'Accommodation
fo... [] [{u'reportDate': u'2020-10-01', u'linkId': u'1... [{u'name':
u'Caring for adults over 65 yrs'}, ... Social Care Org 100070537642






How to replace or drop all columns which are neither numeric nor text
values?

What is the fastest way?

Regards,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pandas-dev/attachments/20201116/0ee4cfe3/attachment.html>


More information about the Pandas-dev mailing list