Skip to content

How to add column name for index in Pandas dataframe

This is about Pandas dataframe. I have a dataframe made by following python code. There is no column name for index. What I’d like to do is adding index’s name like ‘date’ in attached capture. I did following, but error occurred because there is no such name of column in df_test. I kno…

How to navigate to different directory in Jupyter Lab?

I tried the answers in How to navigate to a different directory in Jupyter Notebook?, but they didn’t work for various reasons: Some answers are “how to permanently change your Jupyter start-up folder” which I don’t want to do. I already did this, I set my start-up folder and I like it…

Reflecting 4d symmetric data

I’ve found out that there is no example of how to reflect symmetric 4d data, which can be very useful when 3d simulations wants to be performed using a symmetric plane to reduce calculations(e.g. ANSYS, COMSOL, etc). This example shows a data file structure corresponding to a COMSOL simulation, which ha…

How to invoke a specific shell with python?

I want to invoke a specific command shell in python to execute some scripts. For exemple, in R, I use: system2(os_shell = “C:/Program Files (x86)/pgAdmin III/1.18/pg_dump.exe”, args = “very long argument”) Thanks to this code, I can backup my Postgresql’s tables with a for loop. …