Questions tagged [tabulate]

Count or tally of named items in an object or structure.

Various languages will have different functions for this operation. "table" or "crosstabs" are two such examples. The output may be multi-dimensional.

168 questions
0
votes
1 answer

Give color to the text of HTML table email body based on disk usage condition using Python

I am sending out an html table in an email body using python. The html table consists of disk usage and I need to convert the text color in red when disk usage is above 80 percent . I have tried so far Give color to the text of HTML table body based…
ayuuk ja'ay
  • 382
  • 1
  • 3
  • 13
0
votes
1 answer

Python printing tabular data breaks with Google fonts

I'm using the Tabulate package to print data in table format. The output is sent to a webpage. While using the default font everything is working fine. However upon changing font family (Outfit from Google fonts or cursive e.g), they stop being…
Nick M
  • 69
  • 7
0
votes
0 answers

print DataFrame with tabulate without index

My original data has 3 columns - country, downloads and cost in xlsx file. df = pd.read_excel(xls) I want to show for each country the total downloads and total cost, in a table that looks good. I tried using tabulate: installs_by_country =…
AmySQL
  • 1
0
votes
1 answer

Exporting Table from a pdf file

I need to export the table from the pdf and select the particular columns. I have managed to export by the "tabulate","tabula", however it is not exporting in the proper format. In the original file, there are 5 columns, but after exporting I get 3…
YIF99
  • 51
  • 1
  • 8
0
votes
1 answer

How to parse and tabulate file with repeated values

I'm trying to tabulate a text file with following format. It like blocks of data that appears several times. First 5 fields normally appears once in each block of info and in output I'd like to have them fill down (values in green). SOME TEXT SOME…
Ger Cas
  • 2,188
  • 2
  • 18
  • 45
0
votes
1 answer

Sas : viewer results are the same as output

I am writting because I have a problem with my results viewer on Sas 9.4. When they charge the resukts are the same as in output. Instead of having a table with cell I have a table draw with -+|. Layouts options does not work and when exporting to…
Newand
  • 1
0
votes
1 answer

How to use tabulate module with user input and loops in Python?

I have made a program in which the user enters marks of the students and Python tells the average marks and tells us that if the score is satisfactory, good or excellent. It is given below: from array import array as arr import numpy as np from…
0
votes
0 answers

Tables in R/Rstudio- how to include all response options in a table

I am running some demographic data in R. I have created new variables which show what responses represent what demographic. Here is the example of the code I am running data$race <- NULL data$race [data$q1 == 1] <- "White" data$race [data$q1 == 2]…
0
votes
5 answers

How to add a symbol in a Python user input, also when it's in a created file

I am trying to add a dollar sign ("$") to the users input when it asks about their savings and deposits. At the end of my script I am creating a text file with all the information, but I want the numbers to have the symbol in front of it when the…
Amar Mujak
  • 15
  • 5
0
votes
2 answers

Convert a multiway pandas.crosstab to an xarray

I want to create a multiway contingency table from my pandas dataframe and store it in an xarray. It seems to me it ought to be straightfoward enough using pandas.crosstab followed by DataFrame.to_xarray() but I'm getting "TypeError: Cannot…
onestop
  • 800
  • 5
  • 10
0
votes
0 answers

Tabulating GLM summaries for each predictor, for multiple GLM fits

All, I am looking for an efficient way to do the following in R. I have a list of R GLM objects G that all use the same model matrix X. Each GLM object just corresponds to a different response variable Y1... Yp. I would like to create a summary list…
mskb
  • 341
  • 3
  • 12
0
votes
1 answer

how to group by in pandas and tabulate value frequencies

I have: df=pd.DataFrame({'col1':[1,1,1,1,6,6,6,2],'col2':[1,1,1,4,4,4,5,2]}) I want: to group by each value in col1 and then show the tabulated frequencies in the second column (ie, there are 3 1s and 1 4 in group 1 shown as 1:3, 4:1, ie…
frank
  • 3,036
  • 7
  • 33
  • 65
0
votes
1 answer

No module named 'tabulate' when running from cmd

I use a conda environment called tf that has all necessary packages installed. If I run the python file in cmd I get the following error: I reinstalled the package multiple times but it did not make any difference. However if I run my file from…
Daniel
  • 577
  • 4
  • 17
0
votes
1 answer

how to stop table data from over lapping other columns with pandas, bs4, requests and tabulate

Currently I have the code below for a discord bot to display active fire calls in Toronto there are situations where alot of fire trucks are dispatched and when its scraped to a tabulate the dispatched units seem to overlap other columns and rows I…
0
votes
1 answer

how to format my discord python bot output?

I am making a Disord bot based on a python code. The python code is executing perfectly. But when the discord bot calls the program it screws up the formatting/alignment of the output. I am using tabulate on python for the output. Thankful for any…
vieraaj
  • 3
  • 2