Re: [julia-users] Dataframe without column and row names ?
Le lundi 17 octobre 2016 à 06:32 +0200, henri.gir...@gmail.com a écrit : > In fact I don't know how to make the nice border but I noticed > dataframe > does it ... > > I only need the nice border for the matrix, but I don't know how to > do it ? > > Maybe I should ask how to make a nice border in a matrix ? DataFrames' main feature isn't to provide nice borders... You can try overriding the show() method for Matrix if you want borders. Regards > Regards > > Henri > > > Le 15/10/2016 à 22:32, Milan Bouchet-Valat a écrit : > > > > Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit : > > > > > > Hi, > > > Is it possible to have a table with only the result ? > > > I don't want row /column names. > > So why do you create a data frame? Isn't a Matrix enough? > > > > > > Regards > > > > > > > > using DataFrames > > > function iain_magic(n::Int) > > > M = zeros(Int, n, n) > > > for I = 1:n, J = 1:n > > > @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + > > > 1 > > > end > > > return M > > > end > > > mm=iain_magic(3) > > > df=DataFrame(mm)
Re: [julia-users] Dataframe without column and row names ?
In fact I don't know how to make the nice border but I noticed dataframe does it ... I only need the nice border for the matrix, but I don't know how to do it ? Maybe I should ask how to make a nice border in a matrix ? Regards Henri Le 15/10/2016 à 22:32, Milan Bouchet-Valat a écrit : Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit : Hi, Is it possible to have a table with only the result ? I don't want row /column names. So why do you create a data frame? Isn't a Matrix enough? Regards using DataFrames function iain_magic(n::Int) M = zeros(Int, n, n) for I = 1:n, J = 1:n @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1 end return M end mm=iain_magic(3) df=DataFrame(mm)
Re: [julia-users] Dataframe without column and row names ?
Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit : > Hi, > Is it possible to have a table with only the result ? > I don't want row /column names. So why do you create a data frame? Isn't a Matrix enough? Regards > using DataFrames > function iain_magic(n::Int) > M = zeros(Int, n, n) > for I = 1:n, J = 1:n > @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1 > end > return M > end > mm=iain_magic(3) > df=DataFrame(mm)
[julia-users] Dataframe without column and row names ?
Hi, Is it possible to have a table with only the result ? I don't want row /column names. using DataFrames function iain_magic(n::Int) M = zeros(Int, n, n) for I = 1:n, J = 1:n @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1 end return M end mm=iain_magic(3) df=DataFrame(mm)