# New to Julia

**URL:** https://discourse.julialang.org/c/first-steps/8.md?page=45

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

**Page:** 46

---

## [Replacing some DataFrame values based on their type, for multiple columns - limits of the df.colname syntax](https://discourse.julialang.org/t/replacing-some-dataframe-values-based-on-their-type-for-multiple-columns-limits-of-the-df-colname-syntax/114541)

<div class="topic-metadata">

**Author:** [@mjmat](https://discourse.julialang.org/u/mjmat)\
**Replies:** 6\
**Last updated:** [May 22, 2024, 12:34pm UTC](https://discourse.julialang.org/t/replacing-some-dataframe-values-based-on-their-type-for-multiple-columns-limits-of-the-df-colname-syntax/114541 "2024-05-22T12:34:36Z")

</div>

I have a DataFrame where missing values are indicated by somewhat random strings instead of real numbers, so the only way to know that a value is missing is to test whether it is not a Float64. I am trying to replace the…

---

## [Problem installing issue](https://discourse.julialang.org/t/problem-installing-issue/114534)

<div class="topic-metadata">

**Author:** [@mosby](https://discourse.julialang.org/u/mosby)\
**Replies:** 1\
**Last updated:** [May 22, 2024, 12:08am UTC](https://discourse.julialang.org/t/problem-installing-issue/114534 "2024-05-22T00:08:04Z")

</div>

Hello everyone, I have the Julia version 1.8.5 installed and I successfully add a kernel to Jupiter notebook, and I did the same thing to version 1.7.2. Now I need to add the kernel of Julia 1.5.3, when I add package IJu…

---

## [Struct with property based on other properties](https://discourse.julialang.org/t/struct-with-property-based-on-other-properties/93181)

<div class="topic-metadata">

**Author:** [@Eveee](https://discourse.julialang.org/u/Eveee)\
**Replies:** 7\
**Last updated:** [May 21, 2024, 2:03pm UTC](https://discourse.julialang.org/t/struct-with-property-based-on-other-properties/93181 "2024-05-21T14:03:39Z")

</div>

Hi all, I am learning to use structs in Julia, specifically I have a set of integers that I would like to access throughout some calculations: struct MyNumbers a::Int64 b::Int64 c=a+b end However, the assignm…

---

## [Half installed pakage](https://discourse.julialang.org/t/half-installed-pakage/114234)

<div class="topic-metadata">

**Author:** [@kkj](https://discourse.julialang.org/u/kkj)\
**Replies:** 6\
**Last updated:** [May 21, 2024, 11:56am UTC](https://discourse.julialang.org/t/half-installed-pakage/114234 "2024-05-21T11:56:13Z")

</div>

I was installing DynamicalSystems pakage and during installing due to light failure my system went down and when i rebooted my system again and in julia when i tried to type pkg\>add DynamicalSystems the following messag…

---

## [Error with JLD2 load function](https://discourse.julialang.org/t/error-with-jld2-load-function/114495)

<div class="topic-metadata">

**Author:** [@Kreetta\_Hamalainen](https://discourse.julialang.org/u/Kreetta_Hamalainen)\
**Replies:** 1\
**Last updated:** [May 21, 2024, 8:01am UTC](https://discourse.julialang.org/t/error-with-jld2-load-function/114495 "2024-05-21T08:01:29Z")

</div>

Hi all, New to Julia, and don’t quite know where to start with this error. Happens when trying to reload all parameters including ODE related parameters with JLD2 load() function. Fatal error: ERROR: LoadError: Method…

---

## [How to change default number of digits printed for PrettyPrint](https://discourse.julialang.org/t/how-to-change-default-number-of-digits-printed-for-prettyprint/114463)

<div class="topic-metadata">

**Author:** [@freedomjin](https://discourse.julialang.org/u/freedomjin)\
**Replies:** 2\
**Last updated:** [May 20, 2024, 10:02pm UTC](https://discourse.julialang.org/t/how-to-change-default-number-of-digits-printed-for-prettyprint/114463 "2024-05-20T22:02:11Z")

</div>

Hi, I found PrettyPrint.jl quite handy when printing complex data structures, however, for large nested structures, pprint attempts to show all Float values to maximum precision and often overflows entire screen. Is it…

---

## [VSCode errors with user input readline()](https://discourse.julialang.org/t/vscode-errors-with-user-input-readline/75097)

<div class="topic-metadata">

**Author:** [@SebaSharma](https://discourse.julialang.org/u/SebaSharma)\
**Replies:** 5\
**Last updated:** [May 20, 2024, 2:40pm UTC](https://discourse.julialang.org/t/vscode-errors-with-user-input-readline/75097 "2024-05-20T14:40:22Z")

</div>

Hello, I hope you are all doing well I’ve really been enjoying Julia, and it’s been taking the place of Java in my focused language, but I’ve been having some problems with user inputs in VSCode (Vers. 1.63.2 on Windows…

---

## [Differentiating through optimization problem](https://discourse.julialang.org/t/differentiating-through-optimization-problem/114435)

<div class="topic-metadata">

**Author:** [@ij05](https://discourse.julialang.org/u/ij05)\
**Replies:** 17\
**Last updated:** [May 20, 2024, 1:29pm UTC](https://discourse.julialang.org/t/differentiating-through-optimization-problem/114435 "2024-05-20T13:29:34Z")

</div>

Hello all, I am very new to Julia, and I intend to migrate from Matlab to Julia. I was very intrigued with automatic differentiation, and worked out a few problems by hand, to understand the concepts behind reverse mode…

---

## ["Missing reference" warnings with Julia in VS Code?](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321)

<div class="topic-metadata">

**Author:** [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Replies:** 24\
**Last updated:** [May 18, 2024, 3:05pm UTC](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321 "2024-05-18T15:05:44Z")

</div>

Hello, I tried giving VS Code a shot (Atom is my go-to editor). I guess I got too motivated after reading the recent opinions on optimal IDE for Julia…I was wondering if anyone has encountered a “Missing Reference” erro…

---

## [Old Conda environment in Julia](https://discourse.julialang.org/t/old-conda-environment-in-julia/114429)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 1\
**Last updated:** [May 18, 2024, 12:51pm UTC](https://discourse.julialang.org/t/old-conda-environment-in-julia/114429 "2024-05-18T12:51:11Z")

</div>

It seems that I have an old Conda environment in Julia: /Users/sbac/.julia/conda/3/lib/python3.7. I am using now other Python environments with Python version 3.12. I can’t find the name of this environment. How can I (…

---

## [How to implement R-like marginaleffects?](https://discourse.julialang.org/t/how-to-implement-r-like-marginaleffects/114260)

<div class="topic-metadata">

**Author:** [@edvin](https://discourse.julialang.org/u/edvin)\
**Replies:** 4\
**Last updated:** [May 16, 2024, 5:23am UTC](https://discourse.julialang.org/t/how-to-implement-r-like-marginaleffects/114260 "2024-05-16T05:23:17Z")

</div>

Hi, I’m interested in how to implement calculation of partial derivatives/marginal effects similar to the package marginaleffects in r. I translated some code from the excellent documentation, to simply calculate the m…

---

## [How to smooth the if function](https://discourse.julialang.org/t/how-to-smooth-the-if-function/113978)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 11\
**Last updated:** [May 15, 2024, 7:28pm UTC](https://discourse.julialang.org/t/how-to-smooth-the-if-function/113978 "2024-05-15T19:28:35Z")

</div>

Is there currently a library that provides a smoothing function to ensure the differentiability of the judgment function? For example, I have a simple formula here: f(x) = x \> 1 ? x : x^2 Is there a smooth function he…

---

## [Error in precompiling HarfBuzz\_jll and gmsh\_jll](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288)

<div class="topic-metadata">

**Author:** [@VinceRob](https://discourse.julialang.org/u/VinceRob)\
**Replies:** 7\
**Last updated:** [May 15, 2024, 6:46pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288 "2024-05-15T18:46:31Z")

</div>

Hi first post here, I’m having trouble trying to precompile the following packages : HarfBuzz\_jll gmsh\_jll My system is Mac OS 10.15.7 (unfortunately I can’t upgrade). I found this related topic, but my version of …

---

## [How to combine @. with broadcasting for 3d array?](https://discourse.julialang.org/t/how-to-combine-with-broadcasting-for-3d-array/114291)

<div class="topic-metadata">

**Author:** [@Kohei\_Hattori](https://discourse.julialang.org/u/Kohei_Hattori)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 12:50pm UTC](https://discourse.julialang.org/t/how-to-combine-with-broadcasting-for-3d-array/114291 "2024-05-15T12:50:24Z")

</div>

I’m new to Julia. I want to develop code that combines broadcasting with the @macro for a 3D array like the one below. How can I solve this? function func(a,b,c) return sin(a+b+c) end func.(\[0.1, 0.2, 0.3, 0.4\], \[0…

---

## [Lux, ComponentArrays and flat parameters : computing the gradient works with Zygote but not with Enzyme](https://discourse.julialang.org/t/lux-componentarrays-and-flat-parameters-computing-the-gradient-works-with-zygote-but-not-with-enzyme/102533)

<div class="topic-metadata">

**Author:** [@mothmani](https://discourse.julialang.org/u/mothmani)\
**Replies:** 16\
**Last updated:** [May 14, 2024, 8:35pm UTC](https://discourse.julialang.org/t/lux-componentarrays-and-flat-parameters-computing-the-gradient-works-with-zygote-but-not-with-enzyme/102533 "2024-05-14T20:35:38Z")

</div>

Hi all, I’m quite new (on and off) to Julia and I’m trying to play more consistently with it. I have an issue with AD : I can compute the gradient with respect to the weights of a very simple neural network with Zygote …

---

## [IT roadblocks, Julia vs Matlab and Python](https://discourse.julialang.org/t/it-roadblocks-julia-vs-matlab-and-python/114231)

<div class="topic-metadata">

**Author:** [@KCan](https://discourse.julialang.org/u/KCan)\
**Replies:** 5\
**Last updated:** [May 14, 2024, 7:37pm UTC](https://discourse.julialang.org/t/it-roadblocks-julia-vs-matlab-and-python/114231 "2024-05-14T19:37:53Z")

</div>

Hello, First Julia post. I’m an engineer and I have been using Julia for a couple of years and I enjoy how it allows me to express myself, I find Julia empowers me to write decent code faster than I can in other languag…

---

## [Looking for a fun (and quite short!) recreational project? Try implementing a progress bar!](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905)

<div class="topic-metadata">

**Author:** [@mcmuffin6o](https://discourse.julialang.org/u/mcmuffin6o)\
**Replies:** 4\
**Last updated:** [May 14, 2024, 3:16pm UTC](https://discourse.julialang.org/t/looking-for-a-fun-and-quite-short-recreational-project-try-implementing-a-progress-bar/110905 "2024-05-14T15:16:47Z")

</div>

I need to implement a progress bar for a long-term project I’m working on, but I decided to have fun with it by making the bars a little snazzy. If you’re looking for terminal amenities, you’re better off with something…

---

## [Composite types with array type fields](https://discourse.julialang.org/t/composite-types-with-array-type-fields/114253)

<div class="topic-metadata">

**Author:** [@erenust](https://discourse.julialang.org/u/erenust)\
**Replies:** 2\
**Last updated:** [May 14, 2024, 3:12pm UTC](https://discourse.julialang.org/t/composite-types-with-array-type-fields/114253 "2024-05-14T15:12:46Z")

</div>

I am trying to understand the strange behavior I see in the code below. struct A m::Vector{Int32} end struct B m::Vector{Vector{Int32}} end let # Here, the assigment works like a pointer assigment a1 =…

---

## [I don't understand Julia. From running in the command line to workflow](https://discourse.julialang.org/t/i-dont-understand-julia-from-running-in-the-command-line-to-workflow/114235)

<div class="topic-metadata">

**Author:** [@Amnesian](https://discourse.julialang.org/u/Amnesian)\
**Replies:** 4\
**Last updated:** [May 14, 2024, 2:09pm UTC](https://discourse.julialang.org/t/i-dont-understand-julia-from-running-in-the-command-line-to-workflow/114235 "2024-05-14T14:09:10Z")

</div>

My code I’m coming from languages like C, python and mathematica (I only really use mathematica for some data handling and scripting) I have quite a few things I’m struggling with to be honest. The only way I know how…

---

## [QGIS Raster Calculator equivalent for making a binary raster?](https://discourse.julialang.org/t/qgis-raster-calculator-equivalent-for-making-a-binary-raster/114211)

<div class="topic-metadata">

**Author:** [@rholland4julia](https://discourse.julialang.org/u/rholland4julia)\
**Replies:** 1\
**Last updated:** [May 14, 2024, 9:42am UTC](https://discourse.julialang.org/t/qgis-raster-calculator-equivalent-for-making-a-binary-raster/114211 "2024-05-14T09:42:17Z")

</div>

Is there a way to use the Rasters.jl library to obtain the same effect as the Raster Calculator in QGIS for creating a binary raster? (Where the raster = 1 if it meets the logical criterion, but 0 otherwise).

---

## [Butterworth Filter compared to Butter in Matlab](https://discourse.julialang.org/t/butterworth-filter-compared-to-butter-in-matlab/114201)

<div class="topic-metadata">

**Author:** [@ahrensma](https://discourse.julialang.org/u/ahrensma)\
**Replies:** 2\
**Last updated:** [May 13, 2024, 5:51pm UTC](https://discourse.julialang.org/t/butterworth-filter-compared-to-butter-in-matlab/114201 "2024-05-13T17:51:04Z")

</div>

Hello, I am not yet fully familiar with Julia and am currently struggling with the DSP / Butterworth filter. My original Matlab-Code is x = linspace(0, 10, 100); y1 = sin(x); \[b,a\] = butter(3,0.1,'high') y2 = filter(b,…

---

## [At dot of function of five arguments against five vectors to five dimensional array](https://discourse.julialang.org/t/at-dot-of-function-of-five-arguments-against-five-vectors-to-five-dimensional-array/114146)

<div class="topic-metadata">

**Author:** [@PeterSP](https://discourse.julialang.org/u/PeterSP)\
**Replies:** 6\
**Last updated:** [May 12, 2024, 6:13pm UTC](https://discourse.julialang.org/t/at-dot-of-function-of-five-arguments-against-five-vectors-to-five-dimensional-array/114146 "2024-05-12T18:13:25Z")

</div>

I’ve seen many examples that generate a two dimensional array (matrix) from a function of two arguments against two vectors: x = 1:100 y = 1:100 f(x,y) = x\*y z = @. f(x', y) I want to do something analagous, but five-d…

---

## [How to make StructArray work with Static LabelledArray?](https://discourse.julialang.org/t/how-to-make-structarray-work-with-static-labelledarray/114132)

<div class="topic-metadata">

**Author:** [@freedomjin](https://discourse.julialang.org/u/freedomjin)\
**Replies:** 3\
**Last updated:** [May 11, 2024, 8:12am UTC](https://discourse.julialang.org/t/how-to-make-structarray-work-with-static-labelledarray/114132 "2024-05-11T08:12:23Z")

</div>

The following code does not work as expected: \>using StructArrays, LabelledArrays \>SLV2 = @SLVector Int (:x, :y) \>vf=StructArray(\[rand(SLV2) for \_ in 1:5\]) \>vf.x ERROR: type Tuple has no field x The same code with SLVe…

---

## [Meaning of xf](https://discourse.julialang.org/t/meaning-of-xf/114009)

<div class="topic-metadata">

**Author:** [@ssrrii](https://discourse.julialang.org/u/ssrrii)\
**Replies:** 5\
**Last updated:** [May 10, 2024, 1:37pm UTC](https://discourse.julialang.org/t/meaning-of-xf/114009 "2024-05-10T13:37:45Z")

</div>

I try to better understand how to write to and read from xlsx-files. But also to better understand the syntax and idea behind it. For writing to a file the function is given: XLSX.openxlsx(wb\_path, mode=“rw”) do xf … …

---

## [Can Sagemaker Julia query a S3/Athena table with SQL?](https://discourse.julialang.org/t/can-sagemaker-julia-query-a-s3-athena-table-with-sql/66257)

<div class="topic-metadata">

**Author:** [@Billpete002](https://discourse.julialang.org/u/Billpete002)\
**Replies:** 3\
**Last updated:** [May 10, 2024, 3:00am UTC](https://discourse.julialang.org/t/can-sagemaker-julia-query-a-s3-athena-table-with-sql/66257 "2024-05-10T03:00:39Z")

</div>

Is it possible run a SQL-esque script to pull data within Julia from AWS’s S3/Athena? My Julia instance is located on AWS Sagemaker Jupyter Notebook. Using python in SageMaker easily enough: import boto3 region = boto3…

---

## [Changing the colors of certain boxes in a groupedboxplot](https://discourse.julialang.org/t/changing-the-colors-of-certain-boxes-in-a-groupedboxplot/114074)

<div class="topic-metadata">

**Author:** [@JBH\_84](https://discourse.julialang.org/u/JBH_84)\
**Replies:** 0\
**Last updated:** [May 10, 2024, 1:12am UTC](https://discourse.julialang.org/t/changing-the-colors-of-certain-boxes-in-a-groupedboxplot/114074 "2024-05-10T01:12:42Z")

</div>

i am using plots.jl to create some box and whisker plots. I would like to change the boxes of certain colors in the following graph. however when i tried defining my color array that specified which years i wanted to be…

---

## [Feasibility of using Julia to create a DLL connected to Java](https://discourse.julialang.org/t/feasibility-of-using-julia-to-create-a-dll-connected-to-java/114056)

<div class="topic-metadata">

**Author:** [@TravisB](https://discourse.julialang.org/u/TravisB)\
**Replies:** 7\
**Last updated:** [May 9, 2024, 6:33pm UTC](https://discourse.julialang.org/t/feasibility-of-using-julia-to-create-a-dll-connected-to-java/114056 "2024-05-09T18:33:23Z")

</div>

I’m researching which language is best to create a physics engine and would like to use Julia. The requirements are simply that I must be able to produce a DLL which can pass custom data types to/from a front end, writte…

---

## [Isupper is not working](https://discourse.julialang.org/t/isupper-is-not-working/114058)

<div class="topic-metadata">

**Author:** [@Xabo](https://discourse.julialang.org/u/Xabo)\
**Replies:** 3\
**Last updated:** [May 9, 2024, 2:25pm UTC](https://discourse.julialang.org/t/isupper-is-not-working/114058 "2024-05-09T14:25:20Z")

</div>

Just to make sure that the package is installed even though the Unicode package is in the standard library so I don’t need to add it, I write these simple lines and still does not work: julia\> using Pkg julia\> Pkg.add(…

---

## [After Update CUDA, CUDA.jl LoadError](https://discourse.julialang.org/t/after-update-cuda-cuda-jl-loaderror/114042)

<div class="topic-metadata">

**Author:** [@albenstein](https://discourse.julialang.org/u/albenstein)\
**Replies:** 0\
**Last updated:** [May 9, 2024, 8:25am UTC](https://discourse.julialang.org/t/after-update-cuda-cuda-jl-loaderror/114042 "2024-05-09T08:25:24Z")

</div>

Hi there all, After update CUDA to 12.4, CUDA.jl gives this error: ERROR: LoadError: UndefVarError: generic\_trimatmul! not defined Stacktrace: \[1\] getproperty(x::Module, f::Symbol) @ Base ./Base.jl:31 \[2\] top-level…

---

## [Why it is possible to use a global variable in a custom function that declares later than the function declaration?](https://discourse.julialang.org/t/why-it-is-possible-to-use-a-global-variable-in-a-custom-function-that-declares-later-than-the-function-declaration/114034)

<div class="topic-metadata">

**Author:** [@Monkiesh](https://discourse.julialang.org/u/Monkiesh)\
**Replies:** 3\
**Last updated:** [May 9, 2024, 8:14am UTC](https://discourse.julialang.org/t/why-it-is-possible-to-use-a-global-variable-in-a-custom-function-that-declares-later-than-the-function-declaration/114034 "2024-05-09T08:14:30Z")

</div>

Hi Julianners, I am new to Julia. Recently, I find it’s weird that I can use a global variable declares later when I am writing a function. Here is an example: function p(a::Int) return a+b end b = 2 c = p(1) @sho…

[Previous page](https://discourse.julialang.org/c/first-steps/8.md?page=44)

[Next page](https://discourse.julialang.org/c/first-steps/8.md?page=46)
