Is there a way to get autocompletion for pandas dataframe columns in VSCode editor or interactive mode? - python-3.x

I am using VScode and the interaction mode to interactively write a python script. Is there any way to get autocompletion for pandas column names, ideally within the editor or the interactive window. Currently any of those is working.
I only could find this related post which was closed without resolving the problem: https://github.com/microsoft/vscode-jupyter/issues/1561
I also tried rolling back to the old implementation of the interactive mode as suggested here: https://github.com/microsoft/vscode-jupyter/issues/6995 but this did not work as well.
Any suggestions to resolve this issue are welcome as all the rest of VSCode seems to be pretty awesome.

Related

VS Code input and variables don't show frequently in Interactive window

I have started using VS Code for work instead of Anaconda and there are some weird observations which I am not able to figure out.
If I try to execute some code in a cell in the interactive window, many-a-times, only output remains available and the input code automatically gets hidden. For eg. I type the following and execute:-
And this is what I see at the window:-
Similarly, there are some variables which I have already defined but they don't show up in the Jupyer:Variables tab. For eg. there is a variable _link_name_to_index which is not visible in the tab as shown below:-
However, when I execute the same in the window, I can see the values of the dictionary as expected:-
Maybe it is just a matter of some settings, but I still couldn't find out which one. Also, I know I have put a lot of images, because it is not a code doubt as such, rather more of a tool doubt. I have taken only one particular example here, but I face this issue often. I am using VS Code version 1.75.0 in Ubuntu 20.04, using Python 3.9.12 in a virtual environment, if it helps.
This is a bug in the latest Version of VSCode (1.75). It is tracked in this issue. For now, the only option seems to be downgrading to v1.74.x

Running sublime commands

Is there a way to run a sublimetext command (ie, the built-in commands documented here or added) without creating a keybinding or adding something to the pallette and .sublime-commands?
I've tried running sublime.run_command from the console to no avail.
Right before posting I realized I should be using the local window instance.
Opening the python console with ctrl+` and run the command using the current instance window.run_command("<command>", args=<args>) is a workable solution.
(posting anyways because I was unable to find an answer to my question)

How can Pycharm (with matplotlib) show me my graphs in the same Py charm, next to my code?. Not in additional windows

i am using Matplotlib with Pycharm in a Mac osx. When I am making a graph, and I code plt.show() pycharm opens another window. And if there is 2 graphs, to see the 2nd one I have to close the first one. And I want to see both together.
There is a option to show the two graph in the same window, where my code is?
Thanks very much.
This link may help:
IPython magic commands
Using Jupyter notebooks you can achieve what you want by using %matplotlib inline. It seems from the link above that PyCharm may have some way to enable this same functionality.
See also: Inline plots in the scientific view

running a Program from vim that opens another window messes up the formating of my terminal

Im using vim inside a gnome-Terminal to edit a Python Program. Im also using a tiling Window manager calles awesome-wm.
Inside my Python program im plotting some data to a matplotlib graph (when executed that opens another window). When i want to test my Program i use the following comand to run the Program from inside of vim.
:!python3 %
when the Program runs it prints three messages to the shell and opens a matplotlib window to plot the data.
Sometimes i can only see the messed up linebreaks and have to scroll up to see the messages.
My question now is why is the formating inside the console messed up an how do i fix it?
My guess would be that the Terminal Window does not notice that it is beeing resized when the plot window is beeing opend, but i dont know how to refresh the terminal in that case.
using :!clear; python3 % does not help.
Thanks in advance.
(Well, it isn't a direct solution to your problem, but here it goes.)
Most terminal don't handle reflow in resize properly. There is no right ways to do it so most don't attempt to pull all the tricks in the book to make this better. After all, for classic floating window manger, resizing isn't something you do very often. LibVTE/Gnome-terminal isn't designed for tiling WMs and has not been patched over the years to make it better.
Urxvt is probably the most common terminal for AwesomeWM (the default is xterm because it is much more commonly installed by default). It has more advanced features like tabs and transparency you expect from modern terminals. Note that some of them (tabs) are disabled by default.
Sometime using software like tmux can be used to mitigate some of the limitations of any given terminal, but it comes with limitations of its own.

Syntax Coloring for Haskell?

I started using Haskell today and am following the tutorial through learnyouahaskell.com. However, in the tutorial all of their syntax automatically gets colored in the terminal. I am using Command Prompt through ConEmu and was wondering if there was any way that I could also get this coloring (easily). I've been looking for downloads or suggestions online and couldn't find anything. I have Notepadd++ for when I want to make .hs files, but nothing for the terminal itself once I initialize ghci.
I would suggest using Emacs with haskell-mode. I'm a Emacs fan, and I just started exploring Haskell too, haskell-mode works perfectly. I don't know if there is something like this for Notepad++.
Here is full list of editors that support Haskell highlighting. As for terminal colouring, I doubt that it will be easy on Windows (you're on windows, right?), you need an IDE.

Resources