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
gv(3python)															       gv(3python)

NAME
gv_python - graph manipulation in python SYNOPSIS
#!/usr/bin/python import gv USAGE
INTRODUCTION
gv_python is a dynamically loaded extension for python that provides access to the graph facilities of graphviz. COMMANDS
New graphs New empty graph graph_handle gv.graph (name); graph_handle gv.digraph (name); graph_handle gv.strictgraph (name); graph_handle gv.strictdigraph (name); New graph from a dot-syntax string or file graph_handle gv.readstring (string); graph_handle gv.read (string filename); graph_handle gv.read (channel); Add new subgraph to existing graph graph_handle gv.graph (graph_handle, name); New nodes Add new node to existing graph node_handle gv.node (graph_handle, name); New edges Add new edge between existing nodes edge_handle gv.edge (tail_node_handle, head_node_handle); Add a new edge between an existing tail node, and a named head node which will be induced in the graph if it doesn't already exist edge_handle gv.edge (tail_node_handle, head_name); Add a new edge between an existing head node, and a named tail node which will be induced in the graph if it doesn't already exist edge_handle gv.edge (tail_name, head_node_handle); Add a new edge between named tail and head nodes which will be induced in the graph if they don't already exist edge_handle gv.edge (graph_handle, tail_name, head_name); Setting attribute values Set value of named attribute of graph/node/edge - creating attribute if necessary string gv.setv (graph_handle, attr_name, attr_value); string gv.setv (node_handle, attr_name, attr_value); string gv.setv (edge_handle, attr_name, attr_value); Set value of existing attribute of graph/node/edge (using attribute handle) string gv.setv (graph_handle, attr_handle, attr_value); string gv.setv (node_handle, attr_handle, attr_value); string gv.setv (edge_handle, attr_handle, attr_value); Getting attribute values Get value of named attribute of graph/node/edge string gv.getv (graph_handle, attr_name); string gv.getv (node_handle, attr_name); string gv.getv (edge_handle, attr_name); Get value of attribute of graph/node/edge (using attribute handle) string gv.getv (graph_handle, attr_handle); string gv.getv (node_handle, attr_handle); string gv.getv (edge_handle, attr_handle); Obtain names from handles string gv.nameof (graph_handle); string gv.nameof (node_handle); string gv.nameof (attr_handle); Find handles from names graph_handle gv.findsubg (graph_handle, name); node_handle gv.findnode (graph_handle, name); edge_handle gv.findedge (tail_node_handle, head_node_handle); attribute_handle gv.findattr (graph_handle, name); attribute_handle gv.findattr (node_handle, name); attribute_handle gv.findattr (edge_handle, name); Misc graph navigators returning handles node_handle gv.headof (edge_handle); node_handle gv.tailof (edge_handle); graph_handle gv.graphof (graph_handle); graph_handle gv.graphof (edge_handle); graph_handle gv.graphof (node_handle); graph_handle gv.rootof (graph_handle); Obtain handles of proto node/edge for setting default attribute values node_handle gv.protonode (graph_handle); edge_handle gv.protoedge (graph_handle); Iterators Iteration termination tests bool gv.ok (graph_handle); bool gv.ok (node_handle); bool gv.ok (edge_handle); bool gv.ok (attr_handle); Iterate over subgraphs of a graph graph_handle gv.firstsubg (graph_handle); graph_handle gv.nextsubg (graph_handle, subgraph_handle); Iterate over supergraphs of a graph (obscure and rarely useful) graph_handle gv.firstsupg (graph_handle); graph_handle gv.nextsupg (graph_handle, subgraph_handle); Iterate over edges of a graph edge_handle gv.firstedge (graph_handle); edge_handle gv.nextedge (graph_handle, edge_handle); Iterate over outedges of a graph edge_handle gv.firstout (graph_handle); edge_handle gv.nextout (graph_handle, edge_handle); Iterate over edges of a node edge_handle gv.firstedge (node_handle); edge_handle gv.nextedge (node_handle, edge_handle); Iterate over out-edges of a node edge_handle gv.firstout (node_handle); edge_handle gv.nextout (node_handle, edge_handle); Iterate over head nodes reachable from out-edges of a node node_handle gv.firsthead (node_handle); node_handle gv.nexthead (node_handle, head_node_handle); Iterate over in-edges of a graph edge_handle gv.firstin (graph_handle); edge_handle gv.nextin (node_handle, edge_handle); Iterate over in-edges of a node edge_handle gv.firstin (node_handle); edge_handle gv.nextin (graph_handle, edge_handle); Iterate over tail nodes reachable from in-edges of a node node_handle gv.firsttail (node_handle); node_handle gv.nexttail (node_handle, tail_node_handle); Iterate over nodes of a graph node_handle gv.firstnode (graph_handle); node_handle gv.nextnode (graph_handle, node_handle); Iterate over nodes of an edge node_handle gv.firstnode (edge_handle); node_handle gv.nextnode (edge_handle, node_handle); Iterate over attributes of a graph attribute_handle gv.firstattr (graph_handle); attribute_handle gv.nextattr (graph_handle, attr_handle); Iterate over attributes of an edge attribute_handle gv.firstattr (edge_handle); attribute_handle gv.nextattr (edge_handle, attr_handle); Iterate over attributes of a node attribute_handle gv.firstattr (node_handle); attribute_handle gv.nextattr (node_handle, attr_handle); Remove graph objects bool gv.rm (graph_handle); bool gv.rm (node_handle); bool gv.rm (edge_handle); Layout Annotate a graph with layout attributes and values using a specific layout engine bool gv.layout (graph_handle, string engine); Render Render a layout into attributes of the graph bool gv.render (graph_handle); Render a layout to stdout bool gv.render (graph_handle, string format); Render to an open file bool gv.render (graph_handle, string format, channel fout); Render a layout to an unopened file by name bool gv.render (graph_handle, string format, string filename); Render to an open channel bool gv.renderchannel (graph_handle, string format, string channelname); Render to a string result gv.renderresult (graph_handle, string format, string outdata); Render a layout to a malloc'ed string, to be free'd by the caller (deprecated - too easy to leak memory) (still needed for "eval [gv::renderdata $G tk]" ) string gv.renderdata (graph_handle, string format); Writing graph back to file bool gv.write (graph_handle, string filename); bool gv.write (graph_handle, channel); KEYWORDS
graph, dot, neato, fdp, circo, twopi, python. 11 January 2014 gv(3python)
All times are GMT -4. The time now is 03:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy