# \#categoricalarrays

**URL:** https://discourse.julialang.org/tag/categoricalarrays/724.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Add more specialized methods to CategoricalArrays.jl?](https://discourse.julialang.org/t/add-more-specialized-methods-to-categoricalarrays-jl/119043)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 4\
**Last updated:** [September 5, 2024, 4:59am UTC](https://discourse.julialang.org/t/add-more-specialized-methods-to-categoricalarrays-jl/119043 "2024-09-05T04:59:26Z")

</div>

Question to package authors of CategoricalArrays.jl Is there a reason why you haven’t added more specialized methods to your package for, e.g., Base.Broadcasted.broadcasted ? These are not passive-aggressive questions …

---

## [CategoricalArrays.jl syntax question: vectorizing string operation](https://discourse.julialang.org/t/categoricalarrays-jl-syntax-question-vectorizing-string-operation/117106)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 7\
**Last updated:** [July 18, 2024, 2:53pm UTC](https://discourse.julialang.org/t/categoricalarrays-jl-syntax-question-vectorizing-string-operation/117106 "2024-07-18T14:53:17Z")

</div>

I’m assuming that there exists convenient syntax to performantly vectorize string operations on categorical arrays? Suppose we want to subset a categorical array to the values whose labels satisfy some condition. Consid…

---

## [CategoricalArrays Binning](https://discourse.julialang.org/t/categoricalarrays-binning/99400)

<div class="topic-metadata">

**Author:** [@astro-kevin](https://discourse.julialang.org/u/astro-kevin)\
**Replies:** 3\
**Last updated:** [May 26, 2023, 1:37am UTC](https://discourse.julialang.org/t/categoricalarrays-binning/99400 "2023-05-26T01:37:11Z")

</div>

When using the cut function of CategoricalArrays, it returns CategoricalArray objects which contain CategoricalValue objects like \[0,1). However, I don’t seem to understand how to access the value that was cut, for examp…

---

## [Creating data bins with numeric labels with cut()](https://discourse.julialang.org/t/creating-data-bins-with-numeric-labels-with-cut/81281)

<div class="topic-metadata">

**Author:** [@DWSchulze](https://discourse.julialang.org/u/DWSchulze)\
**Replies:** 12\
**Last updated:** [March 17, 2023, 3:05pm UTC](https://discourse.julialang.org/t/creating-data-bins-with-numeric-labels-with-cut/81281 "2023-03-17T15:05:18Z")

</div>

This is Python code to bin data into bins with a numerical label: pd.cut(housing\["median\_income"\], bins=\[0., 1.5, 3.0, 4.5, 6., np.inf\], labels=\[1, 2, 3, 4, 5\]) I want to do this in Julia, but it seems that Julia’s cut…

---

## [CategoricalArray levels! allowmissing](https://discourse.julialang.org/t/categoricalarray-levels-allowmissing/67960)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [October 23, 2021, 6:23pm UTC](https://discourse.julialang.org/t/categoricalarray-levels-allowmissing/67960 "2021-10-23T18:23:59Z")

</div>

I am ordering the categories according to their frequency. What is wrong? using CategoricalArrays, FreqTables x = \["a", "b", "c", "c", missing\] cx = CategoricalArray(x) lvls = names(sort(freqtable(collect(skipmissing(cx…

---

## [Round CategoricalArrays.cut labels](https://discourse.julialang.org/t/round-categoricalarrays-cut-labels/63674)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 7:09am UTC](https://discourse.julialang.org/t/round-categoricalarrays-cut-labels/63674 "2021-06-28T07:09:47Z")

</div>

How can I round the labels to two digits without changing anything else? using CategoricalArrays cut(rand(5), 2, labels=((from, to, i;kw...)-\>"$(round(from, digits=2))-$(round(to, digits=2))")) ERROR: MethodError: no m…
