mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-06-26 03:59:55 +02:00
🧹 Filter annoying UserWarning on every pandas import (on WSL)
This commit is contained in:
parent
5384e18ab5
commit
a20c979351
4 changed files with 25 additions and 4 deletions
|
@ -1,5 +1,12 @@
|
||||||
import pandas as pd
|
|
||||||
import re
|
import re
|
||||||
|
import warnings
|
||||||
|
import os
|
||||||
|
|
||||||
|
with warnings.catch_warnings():
|
||||||
|
# Filter warnings on WSL
|
||||||
|
if "Microsoft" in os.uname().release:
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
|
||||||
mods_info = pd.read_parquet("mods_info_df.parquet")
|
mods_info = pd.read_parquet("mods_info_df.parquet")
|
||||||
|
|
|
@ -15,12 +15,17 @@ from typing import List
|
||||||
from collections.abc import MutableMapping, Sequence
|
from collections.abc import MutableMapping, Sequence
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import pandas as pd
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
from .lib import TagGroup, convert_db_to_parquet, sorted_groupby, flatten, ns, insert_into_db
|
from .lib import TagGroup, convert_db_to_parquet, sorted_groupby, flatten, ns, insert_into_db
|
||||||
|
|
||||||
|
with warnings.catch_warnings():
|
||||||
|
# Filter warnings on WSL
|
||||||
|
if "Microsoft" in os.uname().release:
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('alto4pandas')
|
logger = logging.getLogger('alto4pandas')
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,18 @@ from __future__ import annotations
|
||||||
from itertools import groupby
|
from itertools import groupby
|
||||||
import re
|
import re
|
||||||
import warnings
|
import warnings
|
||||||
|
import os
|
||||||
from typing import List, Sequence, MutableMapping, Dict
|
from typing import List, Sequence, MutableMapping, Dict
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
import pandas as pd
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from lxml import etree as ET
|
from lxml import etree as ET
|
||||||
|
|
||||||
|
with warnings.catch_warnings():
|
||||||
|
# Filter warnings on WSL
|
||||||
|
if "Microsoft" in os.uname().release:
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
__all__ = ["ns"]
|
__all__ = ["ns"]
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,15 @@ from collections import defaultdict
|
||||||
from collections.abc import MutableMapping, Sequence
|
from collections.abc import MutableMapping, Sequence
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import pandas as pd
|
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
from .lib import convert_db_to_parquet, sorted_groupby, TagGroup, ns, flatten, insert_into_db, insert_into_db_multiple, current_columns_types
|
from .lib import convert_db_to_parquet, sorted_groupby, TagGroup, ns, flatten, insert_into_db, insert_into_db_multiple, current_columns_types
|
||||||
|
|
||||||
|
with warnings.catch_warnings():
|
||||||
|
# Filter warnings on WSL
|
||||||
|
if "Microsoft" in os.uname().release:
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('mods4pandas')
|
logger = logging.getLogger('mods4pandas')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue