473,473 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

extract data from CSV coloumn

1 New Member
I have a scenario where I am extracting a row value from a csv file(attached).

Here I am trying to get the value of "server_hit_rate" which is 99% & belongs to 3rd row data. But with this below code I am able to get the data which is in first row only. any advice to achieve the following will be helpful.

Expand|Select|Wrap|Line Numbers
  1. df = pd.read_csv('1.csv',skipfooter=1)
  2. df2 = pd.read_csv('2.csv',skipfooter=1)
  3. combined = pd.merge(df[['Host',' Time Up']],df2[['Host',' Time OK']], on='Host')
  4. combined[' Time OK'] = combined[' Time OK'].apply(lambda x: x.split('(')[0])
  5. combined[' Time Up'] = combined[' Time Up'].apply(lambda x: x.split('(')[0])
  6.  
Nov 12 '17 #1
0 1800

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ashok | last post by:
Hi, is it possible to extract data from a web based java applet in order to enter that data in mysql? for example, something that would let me extract the data shown in applet on...
8
by: nick | last post by:
Hi all can any one please tell me what is wrong in this code?? I'm new to deal with text files and extract data. i'm trying to look for data in a text file (3~4 pages) some lines start with a...
1
by: basyarie | last post by:
Hello All, I`d like to introduce myself. I`m basyarie, now is student of university. Nice to meet you all. I`m beginner in this discussion community. Just want to ask about VB6 for GPS...
2
by: missolsr | last post by:
hi, I am using jpcap to capture OLSR topology control (udp) packets. Does anyone know how to extract data (the way ethereal does it) from the olsr packet? There are methods to extract data...
4
by: bootzwiz | last post by:
Hi, I want to extract data between tags. For example i have following code <span class="t_t_12_b_b">Cast</span><span class="t_t_12_b">: <a href="/test/">Mel Gibb</a></span> I want to...
1
by: bibie | last post by:
How to extract data from mssql and then convert it to mysql using VB6.0. How to connect the mssql..I know a little bit of VB6.0 but only create an interface using STANDARD EXE. Someone told me to...
5
by: ElTipo | last post by:
Hello People, I made a data base with secure wizard to provide to users a PID and Passwords. I need to extract data from Crystal Reports 7 in this data base but Crystal Reports send me a message...
5
by: =?Utf-8?B?aWxy?= | last post by:
Hi This is probably fairly simple but I am newish at programming and was wondering if someone can give me some advice on handling the following. I have an array with a large number of elements...
2
by: someusernamehere | last post by:
Hey, I need to create an application wich extract data from a .csv text (delimited by commas), the problem is that I only need some relevant data, its posssible extract what I want (may be with...
1
by: veer | last post by:
Hi i am making a program in which i want to extract data from html file . Actually there are two dates on html file i want to extract these dates but the main probleum is that these dates are...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.