pip and python referring to different interpreters

I know "multiple-versions-of-python-mess" is nothing new but my question is more specific. I’m learning how to use venv (and pyenv, etc.) and I’ve run into a strange situation. I have a number of different versions of python installed (as one does). I use one of them, 3.9, to create a venv: $ /usr/local/Cellar/python@3.9/3.9.12_1/bin/python3 -m venv… Read More pip and python referring to different interpreters

Most efficient way to search over a DataFrame in Python

I have a DataFrame having these kind of data : df = pd.DataFrame({ ‘id’ : [‘a’, ‘a’, ‘b’, ‘b’, ‘c’, ‘c’], ‘alias’ : [‘value’+str(i) for i in range(6)], ‘source’ : [‘src1’, ‘src2’, ‘src1’, ‘src2’, ‘src1’, ‘src3’] }) print(df) output : id alias source 0 a value0 src1 1 a value1 src2 2 b value2 src1… Read More Most efficient way to search over a DataFrame in Python

Let Join C++ MYSQL library

I’m trying to access "category" table with LEFT JOIN. I need to retrieve the field "name" in this table. This is my code: void Product::read(MYSQL *connection) { MYSQL_RES *result; MYSQL_ROW row; if(mysql_query(connection, "SELECT * FROM product LEFT JOIN category ON product.category=category.category_id")) std::cout<<"Query failed!!"<<mysql_error(connection)<<std::endl; else result=mysql_store_result(connection); if(result->row_count>0) { while(row=mysql_fetch_row(result)) { std::cout<<"Name: "<<row[1]<<" Brand: "<<row[3]<<" Price: "<<row[4]<<"… Read More Let Join C++ MYSQL library