Sponsored Content
Top Forums Programming Python : Problem with " TypeError: float() argument must be a string or a number " Post 303043100 by Scrutinizer on Saturday 18th of January 2020 04:32:37 AM
Old 01-18-2020
According to : Pandas' api reference

pandas.read_csv returns
Code:
DataFrame or TextParser
A comma-separated values (csv) file is returned as two-dimensional data structure with labeled axes.

Which is not the string or number, that float() expects
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem: Need to check if a string argument contains "-"

I am passing a string as argument. Need to check if it contains "-". If it contains "-" then check if it contains "-r" .If Yes then print some message else check if it contains "-t".If yes print some message. How this check can be done using shell script? How I can do this by using IF OR... (7 Replies)
Discussion started by: nehagupta2008
7 Replies

2. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies

3. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

4. Shell Programming and Scripting

input string="3MMTQSZ348GGMZRQWMJM4SD6M";output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6

input string="3MMTQSZ348GGMZRQWMJM4SD6M" output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6M" using linux shell script (4 Replies)
Discussion started by: pankajd
4 Replies

5. Shell Programming and Scripting

Shell Script to identify the line number containing a particular "string"

Hi, I have a log file, where i am required to identify the line number, where a particular string/line appears in the log file. And then copy 200 lines above that line number to a new file. Can someone provide pointers on how to write this script or what command to be used ? Any... (2 Replies)
Discussion started by: kk2202
2 Replies

6. HP-UX

Script to identify the line number containing a particular "string"

Hi, I have a log file, where i am required to identify the line number, where a particular string/line appears in the log file. And then copy 200 lines above that line number to a new file. Can someone provide pointers on how to write this script or what command to be used ? Any... (1 Reply)
Discussion started by: kk2202
1 Replies

7. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

8. Shell Programming and Scripting

grep with "[" and "]" and "dot" within the search string

Hello. Following recommendations for one of my threads, this is working perfectly : #!/bin/bash CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" ) Now I need a grep success for some thing like : #!/bin/bash CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies

9. SuSE

"ssh suse-server 'python -V' > python-version.out" not redirecting

Okay, so I have had this problem on openSUSE, and Debian systems now and I am hoping for a little help. I think it has something to do with Python but I couldn't find a proper Python area here. I am trying to redirect the output of "ssh suse-server 'python -V'" to a file. It seems that no matter... (3 Replies)
Discussion started by: Druonysus
3 Replies

10. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::ApacUser:Contributed Perl Dapache_mod_perl-108~358::mod_perl-2.0.7::docs::api::Apache2::URI(3)

NAME
Apache2::URI - Perl API for manipulating URIs Synopsis use Apache2::URI (); $hostport = $r->construct_server(); $hostport = $r->construct_server($hostname); $hostport = $r->construct_server($hostname, $port); $hostport = $r->construct_server($hostname, $port, $pool); $url = $r->construct_url(); $url = $r->construct_url($rel_uri); $url = $r->construct_url($rel_uri, $pool); $parsed_uri = $r->parse_uri($uri); $parsed_uri = $r->parsed_uri(); $url = join '%20', qw(one two three); Apache2::URI::unescape_url($url); Description While "APR::URI" provides a generic API to dissect, adjust and put together any given URI string, "Apache2::URI" provides an API specific to Apache, by taking the information directly from the $r object. Therefore when manipulating the URI of the current HTTP request usually methods from both classes are used. API
"Apache2::URI" provides the following functions and methods: "construct_server" Construct a string made of hostname and port $hostport = $r->construct_server(); $hostport = $r->construct_server($hostname); $hostport = $r->construct_server($hostname, $port); $hostport = $r->construct_server($hostname, $port, $pool); obj: $r ( "Apache2::RequestRec object" ) The current request object opt arg1: $hostname ( string ) The hostname of the server. If that argument is not passed, "$r->get_server_name" is used. opt arg2: $port ( string ) The port the server is running on. If that argument is not passed, "$r->get_server_port" is used. opt arg3: $pool ( "APR::Pool object" ) The pool to allocate the string from. If that argument is not passed, "$r->pool" is used. ret: $hostport ( string ) The server's hostport string since: 2.0.00 Examples: o Assuming that: $r->get_server_name == "localhost"; $r->get_server_port == 8001; The code: $hostport = $r->construct_server(); returns a string: localhost:8001 o The following code sets the values explicitly: $hostport = $r->construct_server("my.example.com", 8888); and it returns a string: my.example.com:8888 "construct_url" Build a fully qualified URL from the uri and information in the request rec: $url = $r->construct_url(); $url = $r->construct_url($rel_uri); $url = $r->construct_url($rel_uri, $pool); obj: $r ( "Apache2::RequestRec object" ) The current request object opt arg1: $rel_uri ( string ) The path to the requested file (it may include a concatenation of path, query and fragment components). If that argument is not passed, "$r->uri" is used. opt arg2: $pool ( "APR::Pool object" ) The pool to allocate the URL from If that argument is not passed, "$r->pool" is used. ret: $url ( string ) A fully qualified URL since: 2.0.00 Examples: o Assuming that the request was http://localhost.localdomain:8529/test?args The code: my $url = $r->construct_url; returns the string: http://localhost.localdomain:8529/test notice that the query (args) component is not in the string. You need to append it manually if it's needed. o Assuming that the request was http://localhost.localdomain:8529/test?args The code: my $rel_uri = "/foo/bar?tar"; my $url = $r->construct_url($rel_uri); returns the string: http://localhost.localdomain:8529/foo/bar?tar "parse_uri" Break apart URI (affecting the current request's uri components) $r->parse_uri($uri); obj: $r ( "Apache2::RequestRec object" ) The current request object arg1: $uri ( string ) The uri to break apart ret: no return value warning: This method has several side-effects explained below since: 2.0.00 This method call has the following side-effects: 1. sets "$r->args" to the rest after '?' if such exists in the passed $uri, otherwise sets it to "undef". 2. sets "$r->uri" to the passed $uri without the "$r->args" part. 3. sets "$r->hostname" (if not set already) using the ("scheme://host:port") parts of the passed $uri. "parsed_uri" Get the current request's parsed uri object my $uri = $r->parsed_uri(); obj: $r ( "Apache2::RequestRec object" ) The current request object ret: $uri ( "APR::URI object" ) The parsed uri since: 2.0.00 This object is suitable for using with "APR::URI::rpath" "unescape_url" Unescape URLs Apache2::URI::unescape_url($url); obj: $url ( string ) The URL to unescape ret: no return value The argument $url is now unescaped since: 2.0.00 Example: my $url = join '%20', qw(one two three); Apache2::URI::unescape_url($url); $url now contains the string: "one two three"; See Also "APR::URI", mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.16.2 2011-02-07 apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::Apache2::URI(3)
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy