MEHMET BALIOGLU

How to Generate OpenAI GPT Output in JSON Format Using Python for Legal Text Analysis

JSON output with OpenAI GPT function calls

Generating consistent JSON output is now possible thanks to function calling feature in OpenAI’s gpt-4-0613 andĀ gpt-3.5-turbo-0613 models. Function calling introduces a systematic approach to generating structured data. This capability allows for the precise definition of functions within the models, which then produce outputs in JSON format, as opposed to unstructured text. This development addresses the […]

If using all scalar values you must pass an index

The Problem: When you try to create a pandas dataframe using only scalar values without passing an index, you will get a ValueError: If using all scalar values, you must pass an index. In this article, I will provide an explanation of the problem and three easy and different solutions. First, let’s understand the root […]

šŸ… How to Combine Pandas Dataframe Columns Easily

In Python based data analysis projects, it is quite common to combine dataframe columns. Actually, it is super easy to to this. In this blog post, I am going to show you how to combine pandas dataframe columns easily. There are more than one ways to combine multiple pandas dataframe columns. Luckily, the easiest method […]

[Step-by-Step] How to Install TaLib Library on Linux?

How to Install Ta-Lib Library on Linux

TaLib is a high quality technical analysis library, originally written in C language. Thanks to its developers, there is a Python wrapper which allows us to use in Python, too. However, installing it is a bit tricky and requires more steps than simply installing it with pip. In this post, I am going to show […]

Python How To Remove Everything Except Letters & Numbers

Python How To Remove Everything Except Letters And Numbers

Letters and numbers are technically called alphanumeric characters. In this article, I am going to show you how to remove everything except letters and numbers from a string in Python. So you will keep only alphanumeric characters (letters and numbers) and delete everything else. For this, we will use Python regular expression module. It is […]

[6 Lines Of Code] How To Connect Oracle Database In Python

How To Connect Oracle Database In Python

Oracle is generous to give everyone a full cloud database for free. I am frequently using this database because Oracle SQL is really a powerful tool for data analysis. Currently, I create many CSV files, from webscraping, financial data from APIs, etc.. So, a connection between Python and Oracle database is an absolute requirement for […]

[SOLVED!] How to convertĀ frame.append() toĀ pandas.concat()?

FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.

I was using frame.append method to add rows to a dataframe, yet it is deprecated and going to be removed from pandas. So, in this article, I will tell you how to convert DataFrame.append() to pandas.concat(). It’s easy. This is my original code with append method. With this code, I was appending a dataframe to b dataframe. […]