- 5

python

Problem Statement: Scrape any 2 cities for all 29 states in India from any database/source. Make a code function(State) which takes State as a input (ex. Uttar Pradesh, Maharashtra) and print any 2 cities. You should not use any API for this exercise. Output: Scrapped Output should be csv file in following format: Record no. Country - India State - All 29 states in India City - cities for a given state (1 city per row) Example: Record No, Country , State , City 1, India, Maharashtra, Pune 2, India, Maharashtra, Mumbai 3, India, Uttar Pradesh, Kanpur 4, India, Uttar Pradesh, lucknow function(state): Input - Maharashtra Output - Pune, Mumbai Deliverables: Submission of scraping code and function(State) Csv file

5th Aug 2017, 1:08 PM
Avadhesh Pal
Avadhesh Pal - avatar
15 odpowiedzi
+ 7
And how can you do dis with PYTHON?
7th Aug 2017, 5:42 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 6
@Daniel who are you talking about? (1) Avadhesh or me?
7th Aug 2017, 5:48 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 6
Yeah, like I never ask my Comouting Studies assignments on Sololearn
7th Aug 2017, 5:59 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 5
I think it is vague and maybe you are right. Why would we urgently need these kinda data.
7th Aug 2017, 5:52 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
I think always we could help between us but do a task for others because others don't want to work is bad.
7th Aug 2017, 5:55 AM
Daniel
Daniel - avatar
+ 2
Maybe we can wait for @AVADHESH PAL
7th Aug 2017, 6:04 AM
Daniel
Daniel - avatar
+ 2
thanks Man, I did it
10th Aug 2017, 1:11 AM
Avadhesh Pal
Avadhesh Pal - avatar
+ 1
@Avadhesh Pal maybe do you need it for some question in your job?
7th Aug 2017, 5:39 AM
Daniel
Daniel - avatar
+ 1
1 - You aren't answer my question. 2 - You can check it https://docs.python.org/3/library/csv.html but you wrote "You should not use any API for this exercise." so really I don't know what is the purpose of that. 3 - To write a CSV really I think you don't need nothing special because if you open that kind of file with a notepad, you will see is very simple. CSV is a text file.
7th Aug 2017, 5:47 AM
Daniel
Daniel - avatar
+ 1
Maybe both, what do you think about Avadhesh is asking?
7th Aug 2017, 5:51 AM
Daniel
Daniel - avatar
+ 1
Well, I must to say I have a simple solution now in my private code, Im trying to improve my skills everyday but first I want to know about my questions for @AVADHESH PAL, then I will show my code
7th Aug 2017, 7:21 AM
Daniel
Daniel - avatar
+ 1
https://code.sololearn.com/csBqJugOK9uj/?ref=app When I do a code to help is for share so You can see it @Avadhesh
9th Aug 2017, 4:44 PM
Daniel
Daniel - avatar
+ 1
I hope it help you ;-)
9th Aug 2017, 4:44 PM
Daniel
Daniel - avatar
+ 1
Sorry I think I forgot to complete CSV format but I think you can complete it concatening with comma , or semicolon ; and of course with data. I will be waiting for your code, I think I did the difficult thing about your question
9th Aug 2017, 4:49 PM
Daniel
Daniel - avatar
+ 1
Please share it ;-)
10th Aug 2017, 1:12 AM
Daniel
Daniel - avatar