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
1
vote
1 answer

How can I make a table using lists as columns?

I am using Python 3.8.10 in IDLE on Ubuntu 20.10. In a few words, I have several .fits files from which I have to read some parameters. I already have my readfits function for this: it opens the file and adds the values that I need to a list. Now I…
1
vote
0 answers

Can I export tab, summarize() table from Stata to LaTeX?

I was wondering if there is a way to export tab, summarize() table to LaTeX. I have tried eststo col: estpost tab and tabout but error shows option summarize() not allowed.
l_sq
  • 11
  • 1
1
vote
5 answers

Count unique occurrences within data frame

Let the table be as follows: v1 v2 v3 A B A B B A A C D C D What i want R to create a table for number of occurences of unique values for each column: v1 v2 v3 A 1 1 B 1 2 C 0 1 D 1 0
noname
  • 51
  • 4
1
vote
1 answer

Adding or subtracting columns/rows in a table based on user input with Python

I'm editing this post because I didn't do a good job explaining my question, so here goes again. I'm working with the tabulate library. I'm looking to use input() to automatically adjust the number of columns/rows in a table based off the input…
WaXxX333
  • 388
  • 1
  • 2
  • 11
1
vote
1 answer

ModuleNotFoundError: No module named 'tabulate'

I am using Jupyter notebook system. I have already installed tabulate using cmd as pip install tabulate. The requirements are also satisfied but still getting this…
1
vote
1 answer

How to replace values in an array based on table values?

I have the following script and sample data: import numpy as np from tabulate import tabulate a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) table =…
Lyndz
  • 347
  • 1
  • 13
  • 30
1
vote
1 answer

Is there a way to put statistics on a PROC tabulate table next to each other instead of stacked on top of each other?

I'm trying to make a proc tabulate table with statistics like "mean" and "standard deviation." However, when I make the table, the statistics are listed on top of each other (shown in the attached picture), and I'd like them side-by-side to make the…
w_condren
  • 11
  • 1
1
vote
0 answers

VBA tabulation based on lookup

tl;dr? I need to tabulate hours from one sheet and write the value in the cell on another sheet. Here are the relevant details: I need help calculating a sum that is based on a set of referenced values in an Excel workbook. We're trying to evenly…
Nate Swany
  • 11
  • 2
1
vote
1 answer

Tabulate Spherical Harmonic Functions

Hey I am trying to express the spherical harmonics in a compact way. I can not figure out how to express this in a table I got the spherical Harmonics for l = 0,1,2 and m = -l, ...,+l in a list. But wanted a Table in the form: m -2 -1 0 1 2 l …
trynerror
  • 219
  • 2
  • 12
1
vote
0 answers

Set column width properly when printing empjis in Python with Tabulate

I am trying to print out emojis as a table using tabulate however I am not getting the right allighment. How can I fix that? emojis = [['', '', '', '', '', '', ''], ['', '', '', '', '', '', ''], ['' , '', '', '', '', '', ''], …
Hazem Alabiad
  • 1,032
  • 1
  • 11
  • 24
1
vote
1 answer

Using tabulate, how to print a list as a single row instead of a single column?

With this code: from tabulate import tabulate print(tabulate(["0", "1", "2"])) I get: - 0 1 2 - I would like to get: - - - 0 1 2 - - - Any ideas?
LoneCodeRanger
  • 413
  • 6
  • 18
1
vote
1 answer

Haskell Tabulate function using Foldmap "Out of Scope"

I am trying to write a definition for "tabulate", a function that produces the monoidal summary of the values in the given Map that correspond to the keys in the given Foldable collection. Here is my code: module Foldables where import Prelude…
steve
  • 119
  • 7
1
vote
1 answer

Pandas to_mardown() highlight row

Is it possible to change the text color for a specific row when using df.to_markdown()? I have attempted using df.style.apply([styles]).to_markdown() but does does not work since it converts the df into an styler…
David
  • 487
  • 2
  • 6
  • 18
1
vote
1 answer

In which package of r is the function "envrmt"?

I wanted to use a csv-file as data.frame to work with. I wrote: df <- read.table(paste0(environment$path_data_csv,"C:/Users/Muench/edu/mpg-envinsys-plygrnd/Datenanalyse/mpg-data-analysis-2019-Muenchj4/hessen_holzeinschlag_1997-2014.csv"), …
Joachim
  • 11
  • 2
1
vote
1 answer

Python Tabulate formats characters as separate columns

Using pandas, I am reading in a tab delimited file that looks like this: with the following code: pantry_file = pd.read_csv('/PantryList.txt', sep='\t') Based on user input, I want to print out a nice looking table of all Items in this file. I am…
Mark P.
  • 1,827
  • 16
  • 37