How do I Differentiate between Ordinal and Nominal variables using Python?  The code needs to be dynamic and must be able to identify the difference for any data set that comes in. Is it possible to achieve this using python program?  The output must be the type of the variable (Nominal or Ordinal).
I have a data frame in python where I need to find all categorical variables. Checking the type of the column doesn't always work because int type can also be categorical.   So I seek help in finding the right hypothesis test method to identify if a column is categorical or not.   I was trying below chi-square test but I am not sure if this is good enough  import numpy as np data = np.random.randint(0,5,100) import scipy.stats as ss ss.chisquare(data)   Please advise.
Differences between astronomy, astrophysics and cosmology? If $f$ is an entire function where every power series expansion has at least one 0 term, show it is a polynomial Suppose $f$ is entire and that in every power series $f(z)=\sum_{n=0}^\infty c_n(z-a)^n$ at least one coefficient is $0$. Prove that $f$ is a polynomial. I'm trying to solve a question where I need to write $\frac {1}{1+z^2} $ as a power series centered at $z_0=1$  I'm not allowed to use taylor expansion. So my first thought was to rewrite the function in a form where I can apply the basic identity:  $$ \frac{1}{1-x} = \sum_{n=0}^\infty x^n $$  So let's rewrite the original function $f(z) = \frac {1}{1+z^2} $ and use above identity:  $$\frac {1}{1+z^2} = \frac {1}{1-(-z^2)} $$ But observe that I need to center it at $z_0=1$ so I rewrote it to:  $$\frac {1}{1-(-z^2)}=\frac {1}{2z-(-(z-1)^2)} $$  I can factor out $\frac {1}{2z}$ and use the basic identity to get : $$\frac {1}{2z}\frac {1}{1-\frac{(z-1)^2}{2z}} = \frac {1}{2z}\sum_{n=0}^\infty \left(\frac{-(z-1)^2}{2z}\right)^n =\frac {1}{2z}\sum_{n=0}^\infty \frac{(-1)^n(z-1)^{2n}}{(2z)^n} = \sum_{n=0}^\infty \frac{(-1)^n(z-1)^{2n}}{(2z)^{n+1}}$$  The problem is if I ask wolfram alpha: power series$ \frac{1}{1+z^2} $centered at z = 1 it will give me a different answer that doesn't match the sum I found.  Can anyone help me figure this one out? What am I doing wrong? Multiplying by a $1\times 1$ matrix? For matrix multiplication to work, you have to multiply an $m \times n$ matrix by an $n \times p$ matrix, so we have $$\bigg(m \times n\bigg)\bigg(   n\times p \bigg).$$  But what about a $1 \times 1$ matrix? Is this just a scalar? But every matrix can be mulitplied by a scalar; so do $1 \times 1$ matrices break the rule? I'm in Belgium (french part) and I cannot find the proper keyboard layout in Settings > Region and Languages > Input Sources.  the closest I found is the french (AZERTY) one but for the symbols such as ! and _ it's not the same keys...  what can I do to solve it ?  Thank you. When do you use Quantum Mechanics? Given a problem, how does one know whether to use quantum mechanics or classical mechanics?   Take for example electron scattering from a nucleus. The electrons are given a wavefunction in this case. Why not use the classical approach? Double SOCKS5 proxy using SSH I was searching for a way to connect to one of my servers who is behind a jumpbox via SSH. I was able to do so by running the following command:  $ ssh -tt ptitpou@jumpbox ssh -tt ptitpou@targetserver   Now, I want to be able to use that server to access webservers on targetserver's network. For that, I followed  and I was able to successfully access the websites. The command I used was:   $ ssh -L 127.0.0.1:9999:localhost:9696 -tt ptitpou@jumpbox ssh -D 9696 -tt ptitpou@targetserver   The question I want to ask is how to use the ssh -o ProxyCommand to command in a slightly cleaner way. I tried to put the second part of the command as the proxy command and I had a successful SSH connection, but I was unable to use the proxy after that.   I've also tried  but the command line hangs after connecting to targetserver.  How can I do that? Am I wrong to try to use ProxyCommand option for this task? Vieta Jumping: Related to IMO problem 6, 1988: If $ab + 1$ divides $a^2 + b^2$ then $ab + 1$ cannot be a perfect square. The famous IMO problem 6 states that if $a,b$ are positive integers, such that $ab + 1$ divides $a^2 + b^2$, then $\frac{ a^2 + b^2}{ab + 1 }$ is a perfect square, namely, $gcd(a,b)^2$.  How about a modification of this problem:    If $a,b$ are (strictly) positive integers, such that $ab + 1$ divides $a^2 + b^2$, then $ab + 1$ cannot be a perfect square.    I am looking for a proof of the claim above, or a counter-example.  One possible approach towards a proof is the following:   Suppose there is such a pair $(a,b)$ as above, then by the famous IMO problem 6 from 1988, $\frac{ a^2 + b^2}{ab + 1 } = g^2$ where $g = gcd(a,b)$. Since $ab + 1$ is a perfect square, $a^2 + b^2 = c^2$ for some integer $c$. So that $(a,b,c)$ is a Pythagorean tripple, therefore there exists positive integers $n,m,l$ with $n$ coprime to $m$, such that $a = l(n^2 - m^2)$ and $b = 2lnm$ - by Euclids formula.  Then by plugging in $a$ and $b$ in terms of $n,m,l$ into the original equation, and solving for $l$, it is possible to obtain the following:  There exists positive coprime integers $n,m$ such that   $\frac{(n^2 + m^2 + 1)(n^2 + m^2 - 1)}{2mn(n+m)(n-m)}$ is a perfect square.  If we put the quotient above into a program, as in this python code snipet:  N = 1000  for n in range(1,N):     for m in range(n+1, N):         A = (n*n + m*m + 1)*(n*n + m*m - 1)         B = 2*m*n*(n+m)*(m-n)         if A % B == 0:             print(A/B)   The quotient always is 2, regardless of whether or not $n$ and $m$ are co prime! So if the very strong implication   $2mn(n+m)(n-m) \mid (n^2 + m^2 + 1)(n^2 + m^2 - 1) \implies \frac{(n^2 + m^2 + 1)(n^2 + m^2 - 1)}{2mn(n+m)(n-m)} = 2$    holds, then the original problem will be solved. My employer didn't send me W-2 for December 2015. In fact, he told me that I wasn't on payroll for the two months(Dec/Jan) I worked for them so I am not sure whether he will be able to generate W-2 for me or not. I am wondering should I call IRS and inform them about the same, and probably they will call the employer? Or should I report my December 2015 earnings as Miscellaneous and report to IRS while filing taxes? Or what other options do I have? I am a non resident alien on F-1 Visa. My employer also has not paid me full salary as promised, which I am discussing with him.  Also, I got paid by check in January month for my December payment, so I am wondering does this apply for 2015 tax filing as I got paid in January 2016? In how many ways can $7$ girls and $3$ boys sit on a bench in such a way that every boy sits next to at least one girl In how many ways can $7$ girls and $3$ boys sit on a bench in such a way that every boy sits next to at least one girl  The answer is supposedly $1,693,440 + 423,360 = 2,116,800$ How to preserve the same parskip in minipage Expanding an event group shows more events than labeled when there are new events It seems that in the words Englishman, Frenchman, and Scotsman, the ‑man part is pronounced /mən/ (just like in Roman).  Whereas in snowman, the ‑man part is pronounced /mæn/ (just like in no man).  Why is it that when ‑man is appended to snow‑ to make snowman, the pronunciation of the man part doesn’t change?    Wouldn’t it logically follow for it to be pronounced /ˈsnowmən/ not /ˈsnowˌmæn/? Formula Assistance I am creating a formula variable in a Flow but keep getting this error. Crop net Acres is a Number field. IF(     ISBLANK( [Opportunity].Crop_Net_Acres__c),     0,      ( [Opportunity].Crop_Net_Acres__c) )  Error Message:  netAcresFormula (Formula) - The formula expression is invalid: Syntax error. Missing '='  Any thoughts here? Sorry for the title, its hard to put the problem into proper words.  Basically, in Firefox or Chrome, I try to navigate to stackoverflow.com.  The request fails and the URL I see in the navigation bar is:  http://d2e24t2jgcnor2.webhostoid.com/Secure/Error?URL=http%3A%2F%2Fstackoverflow.com%2F&amp;ResponseCode=504&amp;user_id=5b5033d3-3543-4b7c-9844-055afde93841&amp;uc=20140915&amp;subid=20140915&amp;source=browsersafeguard-rockettab-spigot&amp;version=1.0.5370.12627&amp;implementation_id=browsersafeguard-rockettab-spigot%20&amp;block_host=False&amp;reg=False&amp;redirectms=True   This looks shady and my internet seems slower lately. I have a few questions:   Why is my request going through this strange URL? Do the query parameters reveal my identity? How can I stop this?   I use my cell phone’s 3G network and tether it to my laptop. I would like to learn how to use it so I can start to use the terminal more. Skyrim - Companions attacked me for no reason? How to redirect STDIN of background process? In my Ubuntu, i run java application in background. I use bash script to run it and now it looks like:  nohup java -jar app.jar &amp; exit 0   The problem that i want to be able to write an input string to my application, without making it foreground, from different terminals/sessions. Something like  echo "mytext" &gt; /appdir/in   How should i change my script? Why (and how) did using cat on binary files mess up the terminal? If I understand the cat manual correctly:       concatenate files and print on the standard output   cat will take files as argument and print them on standard output. What I don't get is if I use the command:    cat img.png &gt; copy.png   I will obtain 2 png files identical while if I just    cat img.png     I have all chance that my terminal get messed up and misinterpret what I type.     How's that possible?   Binary values are still binary data. Why it does not simply shows a series of 0 and 1 or the interpretation of those binary data in ASCII or whatever the encoding in terminal is?   Is this behavior also possible by cating a text file containing strange characters?   Should a mechanism to prevent this behavior  like try{}catch{} statement should be implemented? When approximating a posterior using MCMC, why don't we save the posterior probabilities but use the parameter value frequencies afterwards?