- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我的代码,用于打印所有职业的平均值和中位数。
occupation_lst = ['ALL OCCUPATIONS', 'MANAGEMENT', 'Chief executives', 'General and operations managers', 'Marketing and sales managers', 'Administrative services managers', 'Computer and information systems managers', 'Financial managers', 'Human resources managers', 'Industrial production managers', 'Purchasing managers', 'Transportation storage and distribution managers', 'Farmers ranchers and other agricultural managers', 'Construction managers', 'Education administrators', 'Architectural and engineering managers', 'Food service managers', 'Lodging managers', 'Medical and health services managers', 'Property real estate and community association managers', 'Social and community service managers', 'Managers all other', 'BUSINESS', 'Wholesale and retail buyers except farm products', 'Purchasing agents except wholesale retail and farm products', 'Claims adjusters appraisers examiners and investigators', 'Compliance officers', 'Cost estimators', 'Human resources workers', 'Logisticians', 'Management analysts', 'Market research analysts and marketing specialists', 'Business operations specialists all other', 'Accountants and auditors', 'Financial analysts', 'Personal financial advisors', 'Credit counselors and loan officers', 'COMPUTATIONAL', 'Computer systems analysts', 'Information security analysts', 'Computer programmers', 'Software developers applications and systems software', 'Web developers', 'Computer support specialists', 'Database administrators', 'Network and computer systems administrators', 'Computer network architects', 'Computer occupations all other', 'Operations research analysts', 'ENGINEERING', 'Architects except naval', 'Aerospace engineers', 'Chemical engineers', 'Civil engineers', 'Computer hardware engineers', 'Electrical and electronics engineers', 'Industrial engineers including health and safety', 'Mechanical engineers', 'Engineers all other', 'Drafters', 'Engineering technicians except drafters', 'Surveying and mapping technicians', 'SCIENCE', 'Medical scientists', 'Chemists and materials scientists', 'Environmental scientists and geoscientists', 'Physical scientists all other', 'Miscellaneous life physical and social science technicians', 'SOCIAL SERVICE', 'Counselors', 'Social workers', 'Clergy', 'LEGAL', 'Lawyers', 'EDUCATION', 'Postsecondary teachers', 'Elementary and middle school teachers', 'Secondary school teachers', 'Other teachers and instructors', 'ARTS', 'Designers', 'Producers and directors', 'Athletes coaches umpires and related workers', 'Editors', 'Broadcast and sound engineering technicians and radio operators', 'HEALTHCARE PROFESSIONAL', 'Pharmacists', 'Physicians and surgeons', 'Physical therapists', 'Registered nurses', 'Clinical laboratory technologists and technicians', 'Diagnostic related technologists and technicians', 'Emergency medical technicians and paramedics', 'Health practitioner support technologists and technicians', 'HEALTHCARE SUPPORT', 'Nursing psychiatric and home health aides', 'PROTECTIVE SERVICE', 'First-line supervisors of police and detectives', 'First-line supervisors of protective service workers all other', 'Firefighters', 'Bailiffs correctional officers and jailers', 'Detectives and criminal investigators', "Police and sheriff's patrol officers", 'Security guards and gaming surveillance officers', 'CULINARY', 'Chefs and head cooks', 'First-line supervisors of food preparation and serving workers', 'Cooks', 'Food preparation workers', 'Bartenders', 'Combined food preparation and serving workers including fast food', 'Waiters and waitresses', 'Dining room and cafeteria attendants and bartender helpers', 'Dishwashers', 'GROUNDSKEEPING', 'First-line supervisors of housekeeping and janitorial workers', 'First-line supervisors of landscaping lawn service and groundskeeping workers', 'Janitors and building cleaners', 'Maids and housekeeping cleaners', 'Pest control workers', 'Grounds maintenance workers', 'SERVICE', 'First-line supervisors of gaming workers', 'Baggage porters bellhops and concierges', 'Personal care aides', 'Recreation and fitness workers', 'SALES', 'First-line supervisors of retail sales workers', 'First-line supervisors of non-retail sales workers', 'Cashiers', 'Parts salespersons', 'Retail salespersons', 'Advertising sales agents', 'Insurance sales agents', 'Securities commodities and financial services sales agents', 'Sales representatives services all other', 'Sales representatives wholesale and manufacturing', 'Real estate brokers and sales agents', 'Sales and related workers all other', 'OFFICE', 'First-line supervisors of office and administrative support workers', 'Bill and account collectors', 'Bookkeeping accounting and auditing clerks', 'Customer service representatives', 'Hotel motel and resort desk clerks', 'Receptionists and information clerks', 'Couriers and messengers', 'Dispatchers', 'Postal service clerks', 'Postal service mail carriers', 'Production planning and expediting clerks', 'Shipping receiving and traffic clerks', 'Stock clerks and order fillers', 'Secretaries and administrative assistants', 'Data entry keyers', 'Insurance claims and policy processing clerks', 'Office clerks general', 'Office and administrative support workers all other', 'AGRICULTURAL', 'Miscellaneous agricultural workers', 'CONSTRUCTION', 'First-line supervisors of construction trades and extraction workers', 'Brickmasons blockmasons and stonemasons', 'Carpenters', 'Carpet floor and tile installers and finishers', 'Construction laborers', 'Operating engineers and other construction equipment operators', 'Drywall installers ceiling tile installers and tapers', 'Electricians', 'Painters construction and maintenance', 'Pipelayers plumbers pipefitters and steamfitters', 'Roofers', 'Sheet metal workers', 'Structural iron and steel workers', 'Construction and building inspectors', 'Highway maintenance workers', 'Mining machine operators', 'Other extraction workers', 'MAINTENANCE', 'First-line supervisors of mechanics installers and repairers', 'Computer automated teller and office machine repairers', 'Radio and telecommunications equipment installers and repairers', 'Security and fire alarm systems installers', 'Aircraft mechanics and service technicians', 'Automotive body and related repairers', 'Automotive service technicians and mechanics', 'Bus and truck mechanics and diesel engine specialists', 'Heavy vehicle and mobile equipment service technicians and mechanics', 'Miscellaneous vehicle and mobile equipment mechanics installers and repairers', 'Heating air conditioning and refrigeration mechanics and installers', 'Industrial and refractory machinery mechanics', 'Maintenance and repair workers general', 'Electrical power-line installers and repairers', 'Telecommunications line installers and repairers', 'Precision instrument and equipment repairers', 'Other installation maintenance and repair workers', 'PRODUCTION', 'First-line supervisors of production and operating workers', 'Electrical electronics and electromechanical assemblers', 'Miscellaneous assemblers and fabricators', 'Bakers', 'Butchers and other meat poultry and fish processing workers', 'Food processing workers all other', 'Computer control programmers and operators', 'Cutting punching and press machine setters operators and tenders metal and plastic', 'Machinists', 'Welding soldering and brazing workers', 'Metal workers and plastic workers all other', 'Printing press operators', 'Laundry and dry-cleaning workers', 'Stationary engineers and boiler operators', 'Water and wastewater treatment plant and system operators', 'Chemical processing machine setters operators and tenders', 'Crushing grinding polishing mixing and blending workers', 'Inspectors testers sorters samplers and weighers', 'Packaging and filling machine operators and tenders', 'Painting workers', 'Production workers all other', 'TRANSPORTATION', 'Supervisors of transportation and material moving workers', 'Aircraft pilots and flight engineers', 'Bus drivers', 'Driver/sales workers and truck drivers', 'Taxi drivers and chauffeurs', 'Railroad conductors and yardmasters', 'Automotive and watercraft service attendants', 'Crane and tower operators', 'Industrial truck and tractor operators', 'Cleaners of vehicles and equipment', 'Laborers and freight stock and material movers hand', 'Packers and packagers hand', 'Refuse and recyclable material collectors']
weekly_lst = [1351, 2041, 1260, 1462, 1191, 1728, 1408, 1365, 1485, 1348, 966, 769, 1329, 1423, 1899, 742, 985, 1210, 914, 1022, 1408, 1137, 926, 1009, 963, 1198, 1232, 1002, 1028, 1431, 1284, 1090, 1132, 1426, 1419, 997, 1428, 1389, 1538, 1438, 1682, 1165, 1079, 1536, 1242, 1552, 1227, 1441, 1424, 1441, 1662, 1532, 1460, 1876, 1778, 1447, 1534, 1527, 977, 963, 1012, 1206, 1250, 1432, 1423, 1553, 846, 889, 904, 877, 1002, 1391, 1886, 956, 1258, 974, 1066, 896, 1001, 993, 1270, 780, 1148, 954, 1041, 1920, 1824, 1265, 1116, 901, 964, 811, 636, 498, 467, 796, 1427, 808, 1033, 754, 1159, 1002, 567, 441, 619, 498, 416, 402, 521, 391, 451, 403, 398, 486, 620, 649, 507, 416, 585, 469, 498, 769, 608, 462, 555, 716, 711, 1028, 415, 601, 590, 925, 815, 1155, 966, 1020, 837, 916, 656, 812, 657, 692, 621, 481, 575, 752, 698, 927, 954, 838, 591, 520, 687, 619, 689, 620, 745, 464, 445, 749, 1040, 652, 687, 637, 639, 856, 596, 888, 585, 863, 584, 766, 869, 939, 754, 1106, 900, 839, 1032, 856, 862, 911, 1025, 846, 722, 831, 928, 592, 806, 895, 773, 1105, 882, 996, 792, 663, 875, 554, 581, 505, 542, 594, 833, 633, 834, 760, 639, 707, 466, 996, 880, 1052, 652, 710, 518, 708, 625, 646, 894, 1735, 615, 747, 585, 1117, 452, 988, 609, 485, 526, 438, 501]
print("Median: %s" % statistics.median(weekly_lst))
print("Mean: %s" % float(statistics.mean(weekly_lst)))
但我想找到含有“工程师”一词的职业的平均值和中位数,但不知道如何去做。我需要一些帮助。
最佳答案
创建另一个仅包含所需职业的列表,并在该列表上执行计算。
occupation_lst = ['ALL OCCUPATIONS', 'MANAGEMENT', ...]
weekly_lst = [1351, 2041, ...]
engineer_lst = []
for i, title in enumerate(occupation_list):
if 'engineer' in title:
engineer_lst.append(weekly_lst[i])
print("Median: %s" % statistics.median(engineer_lst))
print("Mean: %s" % float(statistics.mean(engineer_lst)))
关于python - 如何打印想要的职业的平均值/中位数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55074173/
基本上在 excel 中,我想要一个表格,就像下面右边给出的那个(我的数据规模比给出的例子大很多),它有每个主题的中位数,每个条件(例如 TADA、TADP、TPDA , TPDP)。理想情况下,我会
我有一个大小为5000 * 5000的矩阵,其90%的值为0。是否有现成的解决方案可用来计算排除“0”后该矩阵的均值,中位数? 一种粗制解决方案是将所有0更改为NA并使用 median(x, na.
这个问题已经有答案了: Mean per group in a data.frame [duplicate] (8 个回答) 已关闭 9 年前。 我有一个数据框,详细记录了客户花了多少钱,如下所示:
这是我的代码,用于打印所有职业的平均值和中位数。 occupation_lst = ['ALL OCCUPATIONS', 'MANAGEMENT', 'Chief executives', 'Gen
我的 csv 文件中有一个数据集,如下所示: teacher student student grade Jon marin
如何在 C 中不使用数组的情况下找到一组数字的平均值、中位数?问题不是找到平均值或中位数的方法,而是如果不允许使用数组,如何存储一组数字并对它们执行一些操作? 最佳答案 一个有趣的问题。 关键是找到一
我正在使用 SQL Server 2008 如果我有这样的表: Code Value ----------------------- 4 240 4 299 4 21
我正在尝试获取表中一组值的平均值、中位数、众数和范围。我能够得到平均值,但中位数、范围和众数我得到了错误的值。 下面是我为上述概念尝试过的代码。 Select CDS.[Commodity_S
我正在尝试获取表中一组值的平均值、中位数、众数和范围。我能够得到平均值,但中位数、范围和众数我得到了错误的值。 下面是我为上述概念尝试过的代码。 Select CDS.[Commodity_S
我需要从输入文件中查找平均值、中位数、众数和范围。 [input file has the numbers{60,75,53,49,92,71}] 我不知道如何打印范围内的计算结果或计算众数。 这很糟
这个问题已经有答案了: Division of integers in Java [duplicate] (7 个回答) 已关闭 7 年前。 public static double calcMed
当我输入 1,2,3 时我的中位数计算有问题我的中位数是 = 44 我不知道为什么 double wynik = 0; string x1 = textBox1.Text; string[] tab
我的中位数 3 实现在这里运行不正常。我必须为媒体随机选择 3 个数字,这是我的代码,请帮助我。 #include"stdafx.h" #include #include using namespa
我有一个文件,其中有如下几秒钟的数字: 0.01033 0.003797 0.02648 0.007583 0.007491 0.028038 0.012794 0.00524 0.019655 0.
是否有任何函数(作为数学库的一部分)可以计算 mean 、中位数、众数和范围来自一组数字。 最佳答案 是的,似乎确实有第三个库(Java Math 中没有)。出现的两个是: http://opsres
我目前正在尝试从具有两个条件的一系列数据中提取中位数。本质上相当于下面的 AVERAGEIFS(),我工作得很好。 AVERAGEIFS(): =AVERAGEIFS(Analysis!$F:$F,A
我有一个 pandas 数据框,看起来像这样: 给定行中的每个值要么是相同的数字,要么是 NaN。我想计算数据框中所有两列组合的平均值、中位数和获取计数,其中两列都不是 NaN。 例如,上述数据帧的结
我有以下数据: [4.1, 4.1, 4.1, 4.2, 4.3, 4.3, 4.4, 4.5, 4.6, 4.6, 4.8, 4.9, 5.1, 5.1, 5.2, 5.2, 5.3, 5.3, 5
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 5 年前。
一组整数作为输入。您必须返回该集合的子集,以便该子集的均值 - 中位数最大。 示例 1 输入 {1,2,3,4} 输出 {1,2,4} 例子2 输入 {1,2,2,3,3} 输出 {2,2,3} 最佳
我是一名优秀的程序员,十分优秀!