in Education by
I have a csv file and I am reading this file in python using pandas. I want to read each row of file and store each value of that row in a variable using a loop. How should I do this. Station MAC, First time seen, Last time seen, Power, # packets, BSSID, Probed ESSIDs macaddrees, 2018-06-22 11:23:45, 2018-06-22 11:23:45, -78, 8, 52:62:90:00:03:01, macaddress, 2018-06-22 11:23:46, 2018-06-22 11:24:05, -73, 4, 14:30:04:BB:19:A2, macaddress, 2018-06-22 11:23:52, 2018-06-22 11:24:12, -73, 5, (not associated) , macaddress, 2018-06-22 11:23:43, 2018-06-22 11:24:12, -71, 9, not assocaited, macadress, 2018-06-22 11:23:52, 2018-06-22 11:23:52, -70, 2, (not associated) , macaddress, 2018-06-22 11:23:48, 2018-06-22 11:24:01, -69, 11, NAN, macaddress, 2018-06-22 11:23:46, 2018-06-22 11:24:12, -65, 15, NAN, macaddress, 2018-06-22 11:24:12, 2018-06-22 11:24:12, -62, 2, (not associated) , macaddress, 2018-06-22 11:24:01, 2018-06-22 11:24:12, -54, 2, NAN, macaddress, 2018-06-22 11:23:49, 2018-06-22 11:24:12, -48, 97, NAN, macaddress, 2018-06-22 11:23:43, 2018-06-22 11:24:12, -35, 54, NAN,UET Smart University macaddress, 2018-06-22 11:23:47, 2018-06-22 11:24:03, -23, 108, NAN, macaddress, 2018-06-22 11:23:49, 2018-06-22 11:23:49, -1, 9, NAN, Run code snippetExpand snippet what i have tried is for index, row in df.iterrows(): Station_Mac=(row["Station MAC"]) First_Time_seen=(row["First time seen"]) print(Station_Mac) I want to get variables Station MAC, BSSID etc to pass them to payload function to send data to database import requests url = "http://localhost/api/customers_data/create.php" payload = "{\n \"Station_MAC\": \"56:12:34:345\",\n \n \"First_time_seen\": \"12:45:66:32\",\n \n \"Last_time_seen\": \"-89\",\n \n \"Power\": \"-48\",\n \n \"Packets\": \"12\",\n \n \"BSSID\": \"65:08:08:98\",\n \n \"Probed_ESSIDs\": \"93\"\n}" headers = { 'cache-control': "no-cache", 'Postman-Token': "ca64cf56-19e8-4e6c-85a7-1741355ced79" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) Run code snippetExpand snippet JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Be sure to verify versions np.__version__ '1.14.3' pd.__version__ '0.24.1' all_vars = np.array(df).flatten().tolist()

Related questions

0 votes
    18F-AV-1451-A07 Value refer to another sheet called "CONTENT" in which column "B" and row "3". ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    Currently I'm returning column name of the max value in the each row. df['Active'] = df.idxmax( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 5, 2022 in Education by JackTerrance
0 votes
    Currently I'm returning column name of the max value in the each row. df['Active'] = df.idxmax( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    I have a simple method to search a pandas dataframe column for a list of keywords; however, I'd like to create a ... do everyth 28,passei o dia com o meu amor comemo demai...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    I have a dataset with employee payroll information (df2). It has a date, job title, shift start ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
    Say I have a dictionary that the key of year, and the corresponding value of a list of values. Is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I am trying to create a pandas dataframe that combines all children into one row class Parent(Base): ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I have a pandas series containing a list of dictionaries. I'd like to parse the contents of the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 6, 2022 in Education by JackTerrance
0 votes
    How can I remove emojis that start with '\x' when reading a csv file using pandas in Python? The ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    What is the default value used by sqoop when it encounters a missing value while importing form CSV file. A - NULL B - null C - space character D - No values...
asked Jan 13, 2021 in Technology by JackTerrance
0 votes
    I need to use environment variable "PATH" in yaml file which needs to be parsed with a script. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 10, 2022 in Education by JackTerrance
0 votes
    I have csv file and that looks like following. I want to remove all rows before one row values [ ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    I was trying to write a quick-and-dirty script to generate plots easily. For that, I was using the following code ( ... do I do that? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I have a table in my android app with a column named tags, this column can contain one or ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    Write statements in QBASIC for each of the situations described below. (ii) Assign the value represented by variable ... the variable A Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
...