回复: 1
跳转到指定楼层
上一主题 下一主题
收起左侧

编程凉经

全局:

2025(10-12月) 码农类General 本科 实习@drw - 网上海投 - 技术电面  | 😐 Neutral 😣 Hard | Other | 其他

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x

记录一下编程测试凉经:
1.You are given a file studies.xm/which is an excerpt from scientific database. It contains basic information about a few biomedical studies. Your task is to extract some fields from the XML file and create structured output in the form of a dataframe. Data overview You can access the file using the path ./data/studies.xml All information about a given study is included between ‹item> and ‹/item> tags. The file includes data about seven different studies. Requirements In order to complete the task you must write a function named structure_data that performs the following steps: 1. Extract the following fields for each study (item): o digital object identifier (ol) using the < ce:doi» tag; • publication date using the < publicationdate> 口 tag and convert it to a datetime object in the format YYYY-MM-DD : • title using the < titletext> L tag; • abstractusing the ‹ce:para> tag.2. Save all these values in a dataframe with columns doi publication_date | 口 title ロ and abstract U. 3. The function structure_data should return a dataframe with the following columns: • doi U : a character column with the Dol; • publication_date • : a date column with the publication date in the format YYYY-MM-DD ロ: title • : a character column with the title; abstract •: a character column with the abstract.
All allowed packages have been loaded in the initial solution. • You may want to parse the XML file to a Python dict • object with the xmltodict.parse() function. • You can use the print() 口 function to debug your solution. Available libraries ・pandas 2.2.3 0 • xmltodict 0.14.2 口
Data structure is very complicated. Looks like this:
('item-info': {'itemidlist': {'ce:doi': '10.1007/00431-007-0495-y*. 'itemid': [('@idtype': 'PUI', '#text': '351238211'). ('@idtype': 'MEDL', '#text': 17516086' /1), 'history': ('date-created': ('@year': '2021', 'month': '03', 'eday': '13'). 'date-aip-loaded': ('@year': '2021' '@month': dbcollection': 'MEDL'), '03", '®day': '16'). 'date-loaded': ('@year': '2021', 'emonth': '03", '®day': 'head': {'citation-info': ('citation-type': ('@code': 'ar'), 'citation-language': ('@xml:lang': 'eng'}, 'abstract-language': ('@xml:lang': 'eng'), 'author-keywords': ('author-keyword': ['Chair-rising test'. 'Maximal isometric grip force', 'Peak jump force', 'Peak jump power'))). 'citation-title': ('titletext': ('@xml:lang': 'eng', '@original': 'y', '#text': 'Mechanogra
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
;' is looking to the left; by'>, to the right, "*, up; or v, down. The guards can see everything in a straight line in the direction in which they are facing, as far as the first obstacle ("X' or any other guard) or the edge of the board. The assassin can move from the current field to any other empty field with a shared edge. The assassin cannot move onto fields containing obstacles or enemies. Write a function: def solution(B) O that, given an array B consisting of N strings denoting rows of the array, returns True if is it possible for the assassin to sneak from their current location to the bottom-right cell of the board undetected, and False Otherwise. Write an efficient algorithm for the following assumptions: • N is an integer within the range [1..500); • all strings in B are of the same length M from range [1..500); • there is exactly one assassin on the board; • there is no guard or wall on B[N-1][M-1]; • every string in B consists only of the following characters", X,', », v, '*' and/or 'A. Given B = [' ... O should return False right at the start. ">. A O 1, your function 口 , as the assassin gets spotted 4. Given B = [A. v O " ... 0 1 your function should return False •. It's not possible for the assassin to enter the bottom-right ell undetected, as the cell is observed. Write an efficient algorithm

评分

参与人数 1大米 +15 收起 理由
匿名用户-TOYWX + 15 欢迎分享你知道的情况,会给更多大米奖励!

查看全部评分


上一篇:applied intuition 26 ng hr initial call
下一篇:JPMG Quant OA
全局:
这是drw的面试吗?请问是什么岗位啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表