“How to fix datatype in pandas-dataframe which gives an Value error ?”ValueError: could not convert string to float: '-- ' I am working with a Youtube dataset. But when I try to convert the datatype of a column I get a Value Error. How do I fix it? ValueError: could not convert string to float: '-- '
How do I parse a string to a float or int? In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or parse the string "31" to an integer, 31?  I just want to know how to parse a float str to a float, and (separately) an int str to an int.
Why are the dineutron and diproton unbound? It is known that there are no diproton or dineutron nuclei.  Does this mean that two protons or neutrons are not actually attracted to each other? Even if the attraction was weak, wouldn't it cause bound states anyway?  Related: Interaction term positive while components are negative? I am confused about the interpretation of my interaction term , I have been through similar questions but I am still not sure about the interpretation that I should give to my output .  So this is my model , Y  stands for earnings management , X1 = CSR , X2=CEO duality , as you can see both of the coefficients are negative CSR reduces earnings management manipulation and Duality in my sample reduces em as well  which is in line with the literature and confirm my hypothesis , but to my surprise my interaction term is positive and significant does that mean that CSR combined with duality increase EM ? Or that CEO duality moderates the effect of CSR on EM knowing that in papers that I've read, they only use&quot; moderate &quot;when the interaction term and the components are all negative . Could you please help me ? I am supposed to comment my results but I don&quot;t understand this . Thank you What are the best methods to show a data table in mobile / tablet view? Chrome: remove URL from autocomplete which doesn't show up in history? I accidentally visited gist.gihub.com (note the missing t), and now that URL auto completes each time I start typing gist.…. How can I remove this URL?  I've tried removing it from my history, but that doesn't help:     (note the empty search results) form_state->setRedirect(to_a_new_node_page) from the submitForm function, route "does not exist" issue I created a custom module, It generate a custom Form in a page. When I submit my form, I create a new node. So, I am redirect to the form page but I would like be redirect to the new node page.  I add this line at the end of my submitForm function :   $form_state-&gt;setRedirect('node/'.$mynewnode-&gt;id());   But when I submit my form from the website, I get the empty-white-screen-of-the-death. My apache log :   ... Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: "Route "node/153" does not exist. ...   And then, when I go manually to the node/153 page, there isn't any problem. The page work well.   My question : where is my mistake ? How can I set the redirection after create the new node ? Is it possible from the submitForm function ? Start Ubuntu Unity With Dash Open Design Review: 3.3V Logic to 12V Logic (Uni-directional and Bi-directional) I'm looking for feedback and improvements on my design below. Specific questions are at the end. I created this as an attempt to answer my own, . From my feedback there, it seems like I needed to be more clear in my requirements. These are screenshots from Eagle. If there's a better way to share, please let me know so I can correct it. Entire board  The overall purpose of this board is to translate between 12V logic, and 3.3V logic. The top portion of the board represents the 12V side. The LEDs are placeholders to indicate whether the 12V signal is HIGH or LOW. In practice, these would be replaced with more , requiring up to 3A. The switches are also placeholders, allowing one to manually turn the 12V signal on and off. They are only for test purposes, the &quot;real&quot; 12V signal would be coming as the output from other relays. The bottom half is the 3.3V side. This will be connected to a  (BBB). The board will connect to 2 output GPIO pins and 2 input GPIO pins of the BBB. Overall, I want to translate the 3.3V I/O from the BBB to the 12V signals on the other side (to control more relays and read their signals). I have designed 3 modules to control both directions individually, and together. 3V3_TO_12V Module  This module converts the 3.3V GPIO output from the BBB to a 12V signal on the other side. When the 3.3V signal is low, the 12V signal is low. When the 3.3V signal is high, the 12V signal is high. To do this, the 3.3V GPIO output is connect to a , which turns a  relay on and off. This switches the 12V power as output of the module to be used elsewhere. 12V_TO_3V3 Module  This module converts a 12V signal to 3.3V signal, to be read by a GPIO input from the BBB on the other side. When the 12V signal is low, the 3.3V signal is low. When the 12V signal is high, the 3.3V signal is high. To do this, the 12V signal simply turns a  relay on and off. This switches the 3.3V power to be read as input by the BBB. DUAL_12V↔3V3 Module  This module combines the previous two modules to create a bidirectional translation. If the 12V side is high, the 3.3V input to the BBB GPIO should be high. If the 3.3V output from the BBB GPIO is high, then the 12V side should be high too. It's similar to a logical OR, if either side is high, the corresponding signal on the other side should be high too. A single 12V signal has to be split into individual input and output signals on the 3.3V side for the BBB. Questions  Is the  and  relay combination overkill for having the BBB GPIO output control the 12V power line? I like the isolation and safety it provides, but it seems too much (in terms of cost and board space) Is there a better solution for the 12V to 3.3V conversion. I like the simplicity of the  relay switching a 3.3V signal, but it takes up lots of room. Does the DUAL_12V↔3V3 Module (which combines each translation direction) even make sense? This seems wasteful to use 2 relays and a high side driver, but I haven't found simpler solution that achieves the same result. Should I add pulldown resistors for the BBB GPIO inputs, or are the internal pulldown resistors good enough?  Any other feedback is welcome. I'm new to electronic design. An improved \rowstyle that takes the cell contents as an argument It is possible to format the column entries of a tabular in an argument-style fashion using the lrbox environment to   store the column cell in a box (say) \mybox; and supply \mybox as an argument to some other macro.   Here is a short example illustrating this fact*:  \documentclass{article} \usepackage{array}% http://ctan.org/pkg/array \begin{document} \newsavebox{\mybox} \begin{tabular}{c&gt;{\begin{lrbox}{\mybox}}c&lt;{\end{lrbox}\fbox{\usebox{\mybox}}}c}   One &amp; Two &amp; Three \\ \hline   1 &amp; 2 &amp; 3 \\   4 &amp; 5 &amp; 6 \\   7 &amp; 8 &amp; 9 \\ \hline \end{tabular} \end{document}     The above example uses the  to achieve this column-specific formatting. More specifically, each cell in the column is supplied as an argument to \fbox. Does there exist an equivalent automation that would yield    \documentclass{article} \begin{document} \begin{tabular}{ccc}   One &amp; Two &amp; Three \\ \hline   1 &amp; 2 &amp; 3 \\   \fbox{4} &amp; \fbox{5} &amp; \fbox{6} \\   7 &amp; 8 &amp; 9 \\ \hline \end{tabular} \end{document}   without having to specify \fbox for each entry in the row?  As a start, I know that the  provides \rowfont[&lt;alignment&gt;]{&lt;font specification&gt;}. However, this only applies macros &lt;font specification&gt; to each cell in a row and these macros can't take the cell contents as an argument. Moreover, you need to use the tabu environment in order to use this. So that's a little restricting. Also, trying to decipher the  macros for colouring a tabular or array row is just confusing.  The UK TeX FAQ entry on  modifies the row entries via column specifications and therefore requires the addition of "subtle" identifiers like  \begin{tabular}{|$l|^l|^l|}   to initiate $ and propagate ^ whatever row style is defined. Is there a way around this or at least a cleaner alternative that doesn't use columns to format entries in a row? In particular, a solution should provide an lrbox-style flexibility, since the contents of the cell in the to-be-styled row could be anything, even a paragraph (say).  * There are other alternatives, as indicated by the post . "define:" oneboxing selects completely bogus data I found this weird word, "burke", and decided to check it out. It turned out it was an alternative spelling of "berk". This is what define: berk in chat expanded to:    So, according to that, "berk" as a noun can mean "a fool, prat, twit", or "berk", or "berk", or "berk". Wow, who would have thought "berk" might mean berk. Three times, just to be sure.  That got me really curious so I checked the wiktionary page directly. It shows three meanings for "berk": the same as meaning #1 that was oneboxed, plus two others that are not at all simply stated as "berk".  Further down from there we can find the other three "berks". Number three, for instance, is easy to trace since "indefinite plural berkë" seems quite greppable. And it turns out that it's Albanian. Gauss law and electric flux Can you please explain me what is electric flux. I know it is $\int\mathbf{E}\cdot\mathrm{d}\mathbf{S}$, but in many place its given flux means to flow. But how does electric field "flow"? Also if we assume its the electric field lines (can you also specify what exactly are these) are "flowing" how does $\int\mathbf{E}\cdot\mathrm{d}\mathbf{S}$ give the total electric field lines passing through that area? (can you please elaborate when you explain?)  Pls. I know it shouldn't come here but there is no page for electric flux. I try to write a simple Markdown parser in JavaScript. Therefore I want to check for the [link content][link id] syntax. I use the following code:  data = data.replace( /\[(.*?)\][ ]*\[([0-9]+)\]/g, '&lt;a href="$2"&gt;$1&lt;/a&gt;' );   It works well, but now I want to do this with a RegExp object. So I set up the following bit of code:  var r = new RegExp( '\[(.*?)\][ ]*\[([0-9]+)\]', 'g' ); data = data.replace( r, '&lt;a href="$2"&gt;$1&lt;/a&gt;' );   But it doesn't work. It even says that my regular expression (which works since the first example does a good job) is invalid:     unmatched ) in regular expression   I think it must have to do with some RegExp-object peculiarities I am not aware of. What am I doing wrong and how can the problem be solved? Deseasonalizing count data I used stl() in R to decompose count data into trend, seasonal &amp; irregular components. The resulting trend values are not integers anymore. I have the following questions:   Is stl() an appropriate way to deseasonalize count data? Since the resulting trend is not interger valued anymore, can I use lm() to model the trend components? R : Format the text file output ffmpeg - how to apply filters without losing quality This is my attempt to prove that, if $a &gt; 0$, then $\frac{1}{a} &gt; 0$, using just field and order axioms.  $$a &gt; 0 \implies a \cdot \left(\frac{1}{a}\right)^2 &gt; 0 \cdot \left(\frac{1}{a}\right)^2 \implies a \cdot \left(\frac{1}{a}\right)^2 &gt; 0 \implies a \cdot \left(\left(\frac{1}{a}\right) \cdot \left(\frac{1}{a}\right)\right) &gt; 0$$  By associativity of multiplication:  $$\left(a \cdot \left(\frac{1}{a}\right)\right) \cdot \left(\frac{1}{a}\right) &gt; 0$$  We know that $a \cdot \left(\frac{1}{a}\right) = 1$, because one is the multiplication inverse of the other.   So we have:  $$1 \cdot \left(\frac{1}{a}\right) &gt; 0 \implies \frac{1}{a} &gt; 0 $$  Which is what we wanted to prove.   My question are:    In the field axioms, there's no axiom that says that $0$ times another number is $0$, but I have used this property. How would you translate it to field and order axioms? I have assumed that $\left(\frac{1}{a}\right)^2$ is positive, have you noticed? Note that I need a positive number in order not to change the $&gt;$ sign. But this is not present in the field or order axioms. How would you explain this? The is sometimes pronounced &quot;tha&quot; (/ðə/) or &quot;thi&quot; (/ðiː/). Which is the correct pronunciation of this word? Are both correct and used interchangeably at specific places? If the second question is correct, please provide the rule of pronouncing at different places. Dual Canadian and British citizen - healthcare coverage in the UK? Can ubuntu be installed in intel kabylake 7th gen processor? I am using a 7th generation i5 processor(7200,2.50 ghz).The processor also have intel hd graphics 620 and nvidia geforce 940mx 2gb graphics card. I read previously that only windows 10 can be installed to this specific processor.  Is it true no version of ubuntu can be used with this processor?  If it's possible to install ubuntu using this processor, what additional steps other than the normal installation process should I undertake to get Ubuntu working? states:  Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.  However if the class/method/function that I am importing is only used in rare cases, surely it is more efficient to do the import when it is needed? Isn't this: class SomeClass(object):      def not_often_called(self)         from datetime import datetime         self.datetime = datetime.now()  more efficient than this? from datetime import datetime  class SomeClass(object):      def not_often_called(self)         self.datetime = datetime.now() So this is something I just found out about that I find odd:   Opportunity attacks—trigger off of movement that uses the creatures movement (action, move action, bonus action, reaction.)  Sentinel—Whenever a creature within 5 ft of you makes an attack at a creature other than you.   Booming blade—If the target willingly moves.   Mental Prison spell—if it moves, attacks through it, or reaches any part of body out of it.   So the “willingly” is different than other rulings for how effects related to movement works. However what exactly fits willing?   Cause fear—nope magic is having them move. Dissonant whispers—same thing. They have to immediately move.   So the creature has to want to move completely of its own accord.   Crown of Madness—Humanoid creature you choose must make a wisdom saving throw. On a fail it is charmed by you. (Next is flavor text so skipping.) While charmed in this way the target must make an attack on a creature other than itself that you mentally choose on each of its turns before moving.  It can act normally if you choose no creature or if none are within reach.   Crown of madness isn't making them move but doesnt specifically say willing.  And if the ruling for willing is movement not caused by magic what about magic causing situations where you take damage if you don't move. Would a creature shimmering with evocation energy be spared because he moved out of the magical blender that is cloud of daggers? If no, then what is the go-to rule for willing movement that I should be using?  In short, what movement counts as willing, and where can it be found? Is moving out of obvious danger caused by magic, willing? Is moving away from an ally so you don't hit them, willing?   If there isn't any actual ruling on willing, that's fine; I'll go back to running it with my interpretation, so that it has same wording as AOO. If there is an actual 5e term or explanation for willing (that isn't Sage Advice), please let me know. I just don't see why it was necessary to put a term in the spell that isn't used anywhere else. I understand it could have been overlooked since it was in a splatbook or has just been ignored since most people probably assume that there is "Forced " and "Willing" movement, with the willing being defined as: any movement from an action, move action, bonus action, or reaction. In same way AOO work.