This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.oauth2 import service_account | |
from google.auth.transport.requests import Request | |
# Path to your service account key file | |
key_path = "[INSERT_PATH_TO_KEY_FILE]" | |
# Create credentials using the service account key file | |
credentials = service_account.Credentials.from_service_account_file( | |
key_path, | |
scopes=["https://www.googleapis.com/auth/cloud-platform"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import jsonlines | |
import pandas as pd | |
def jsonl_to_df(file_path): | |
data = [] | |
with jsonlines.open(file_path) as reader: | |
for line in reader: | |
# Process each line of the JSONL file |