{"id":19005148,"url":"https://github.com/naseem1amjad/python-csv-list-conversion-manipulation","last_synced_at":"2025-02-21T14:17:20.196Z","repository":{"id":244175050,"uuid":"430964732","full_name":"naseem1amjad/python-csv-list-conversion-manipulation","owner":"naseem1amjad","description":"Read String as CSV and do the manipulation using Python","archived":false,"fork":false,"pushed_at":"2021-11-23T05:09:41.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T19:27:34.658Z","etag":null,"topics":["algorithm","array-manipulations","assignment","csv-format","evaluation","find","hackerrank","list","python3","search","source-code","spreadsheet-manipulation","test"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naseem1amjad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-23T04:59:41.000Z","updated_at":"2024-07-13T14:01:18.000Z","dependencies_parsed_at":"2024-06-13T09:02:57.043Z","dependency_job_id":"60d07455-3ef8-485b-8180-c69bc9de19dc","html_url":"https://github.com/naseem1amjad/python-csv-list-conversion-manipulation","commit_stats":null,"previous_names":["naseem1amjad/python-csv-list-conversion-manipulation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naseem1amjad%2Fpython-csv-list-conversion-manipulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naseem1amjad%2Fpython-csv-list-conversion-manipulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naseem1amjad%2Fpython-csv-list-conversion-manipulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naseem1amjad%2Fpython-csv-list-conversion-manipulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naseem1amjad","download_url":"https://codeload.github.com/naseem1amjad/python-csv-list-conversion-manipulation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240027433,"owners_count":19736212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","array-manipulations","assignment","csv-format","evaluation","find","hackerrank","list","python3","search","source-code","spreadsheet-manipulation","test"],"created_at":"2024-11-08T18:26:25.208Z","updated_at":"2025-02-21T14:17:20.152Z","avatar_url":"https://github.com/naseem1amjad.png","language":"Python","readme":"# Problem Statement:\nWrite source code in Python that will do following:\nThere are 2 strings S and C. String S represents a table in CSV format, where rows are separated by newline characters ('\\n') and each row consists of one or more fields separated by commas (',').\n\nThe first row contains the names of columns and the following row contains the values.\n\nFor example, the table below is presented by the following string S: \"id,name,age,gender,room,dep.\\n1,Joe,54,M,12,8\\n17,Betty,29,F,15,6\".\n\n+--+------+----+--------+------+------+\u003cbr /\u003e\n| id  |   name   |  age  | gender | room | dep. |\u003cbr /\u003e\n+--+------+----+--------+------+------+\u003cbr /\u003e\n| \u0026nbsp; 1 | \u0026nbsp; \u0026nbsp;   Joe   |   54  |\u0026nbsp;  \u0026nbsp;  \u0026nbsp;  \u0026nbsp;  \u0026nbsp;     M   |  \u0026nbsp;  \u0026nbsp;  12 | \u0026nbsp;  \u0026nbsp; \u0026nbsp;   8 |\u003cbr /\u003e\n| \u0026nbsp; 7 | \u0026nbsp;  Betty   |   29  |\u0026nbsp;  \u0026nbsp;  \u0026nbsp;  \u0026nbsp;  \u0026nbsp;     F   |  \u0026nbsp;  \u0026nbsp;  15 | \u0026nbsp;  \u0026nbsp; \u0026nbsp;   6 |\u003cbr /\u003e\n+--+------+----+--------+------+------+\u003cbr /\u003e\n\nString C is the name of the column described by S that contains only integers. The requirement is to find the maximum value in that column. In the example above, for C = \"age\" , the maximum value is 54.\n\nI have written a function:\u003cbr /\u003e\n\u003ccode\u003e class Solution { public int solution(String S, String C); }\u003c/code\u003e\u003cbr /\u003e\nwhich, given 2 strings S and C consisting of N and M characters, respectively, returns the maximum value in column C of the table described by S.\n\nExamples:\u003cbr/\u003e\n1. Given S = \"area,land,\\n3722,CN\\n6612,RU\\n3855,CA\\n3797,USA\" and C=\"area\"\n\n+-------+-------+\u003cbr /\u003e\n|  \u0026nbsp;  area \u0026nbsp;  | \u0026nbsp;  land \u0026nbsp;|\u003cbr /\u003e\n+-------+-------+\u003cbr /\u003e\n| \u0026nbsp; 3722 \u0026nbsp;| \u0026nbsp; CN \u0026nbsp; | \u003cbr /\u003e\n| \u0026nbsp; 6612 \u0026nbsp;| \u0026nbsp; RU \u0026nbsp; | \u003cbr /\u003e\n| \u0026nbsp; 3855 \u0026nbsp;| \u0026nbsp; CA \u0026nbsp; | \u003cbr /\u003e\n| \u0026nbsp; 3797 \u0026nbsp;|  USA \u0026nbsp; | \u003cbr /\u003e\n+-------+-------+\u003cbr /\u003e\n\nthe function will return 6612\n\n2. Given S = \"city,temp2,temp\\nParis,7,-3\\nKarachi,4,-4\\nLahore,-1,-2\" and C=\"temp\"\n\n+--------+---------+--------+\u003cbr /\u003e\n|  \u0026nbsp;  city \u0026nbsp; \u0026nbsp;  | \u0026nbsp;  temp2 \u0026nbsp;| \u0026nbsp;  temp \u0026nbsp;|\u003cbr /\u003e\n+--------+---------+--------+\u003cbr /\u003e\n| \u0026nbsp; Paris \u0026nbsp;  \u0026nbsp; | \u0026nbsp; \u0026nbsp; 7 \u0026nbsp;  \u0026nbsp; \u0026nbsp; | \u0026nbsp; \u0026nbsp; -3 \u0026nbsp; \u0026nbsp; | \u003cbr /\u003e\n| \u0026nbsp; Karachi \u0026nbsp; | \u0026nbsp; \u0026nbsp; 4  \u0026nbsp; \u0026nbsp; | \u0026nbsp; \u0026nbsp; -4 \u0026nbsp; \u0026nbsp; | \u003cbr /\u003e\n| \u0026nbsp; Lahore \u0026nbsp;  \u0026nbsp; | \u0026nbsp; -1 \u0026nbsp;  \u0026nbsp; \u0026nbsp; | \u0026nbsp; \u0026nbsp; -2 \u0026nbsp; \u0026nbsp; | \u003cbr /\u003e\n+--------+---------+---------+\u003cbr /\u003e\n\nthe function with return -2\n\n\n## Keywords:\nPython, Source Code, Algorithm, SpreadSheet, CSV Format to Array/List conversion, Find in List, Minium Value, Array Manipulation\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaseem1amjad%2Fpython-csv-list-conversion-manipulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaseem1amjad%2Fpython-csv-list-conversion-manipulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaseem1amjad%2Fpython-csv-list-conversion-manipulation/lists"}