Skip to content

Commit

Permalink
deleted lines
Browse files Browse the repository at this point in the history
  • Loading branch information
bakircius committed May 17, 2024
1 parent c4d3e0a commit e4790ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[project]
name = "sosq"
version = "1.0.3"
version = "1.0.5"
authors = [
{ name="bakircius", email="burakbakirci@gmail.com" },
]
description = "Building Dataframe from Stack Overflow API with a search query"
description = "Building Dataframe from Stack Overflow API with a search query and Saving data to csv file"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
Expand Down
11 changes: 7 additions & 4 deletions src/sosq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def process_response(response: Dict) -> Tuple[pd.DataFrame, bool, bool]:

def append_dataframes(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
"""Append one DataFrame to another, handling the first iteration case.
append deprecated, concat usesd instead.
concat deprecated, concat usesd instead.
"""
if df1 is None:
Expand Down Expand Up @@ -81,6 +81,9 @@ def get_result(query, key, access_token):
params = update_params(params, page)
print("Page", page, "ok")

save_to_csv(df_combined, query + ".csv")
return df_combined
print("Query for", query, "successfully saved as csv")
try:
save_to_csv(df_combined, query + ".csv")
print("Saved")
except:
print("Not Saved")
return df_combined

0 comments on commit e4790ec

Please sign in to comment.