• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

iplweb / bpp / 0950478e-207f-4389-967f-fb3a6c1090d4

01 Apr 2025 12:57PM UTC coverage: 43.279% (-3.3%) from 46.628%
0950478e-207f-4389-967f-fb3a6c1090d4

push

circleci

mpasternak
Merge branch 'release/v202504.1175'

1 of 19 new or added lines in 5 files covered. (5.26%)

1780 existing lines in 123 files now uncovered.

15876 of 36683 relevant lines covered (43.28%)

0.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
src/import_polon/utils.py
UNCOV
1
import numpy as np
1✔
UNCOV
2
import pandas as pd
1✔
3

4

UNCOV
5
def read_excel_or_csv_dataframe_guess_encoding(fn, header=0):
1✔
6
    fn = str(fn)
×
7
    fnl = fn.lower().strip()
×
8

9
    if fnl.endswith(".xlsx") or fnl.endswith(".xls"):
×
10
        return pd.read_excel(fn, header=0).replace({np.nan: None})
×
11
    elif fnl.endswith(".csv"):
×
12

NEW
13
        try:
×
14
            # Chardet średnio wykrywa właściwą stronę kodową dla eksportów z POLON w CSV...
NEW
15
            return pd.read_csv(fn, header=0, sep=";", encoding="windows-1250").replace(
×
16
                {np.nan: None}
17
            )
NEW
18
        except (UnicodeEncodeError, UnicodeDecodeError):
×
19
            # ale jezeli to nie windows-1250 to niech wykryje:
NEW
20
            import chardet
×
21

NEW
22
            encoding = chardet.detect(open(fn, "rb").read())
×
NEW
23
            return pd.read_csv(
×
24
                fn, header=0, sep=";", encoding=encoding["encoding"]
25
            ).replace({np.nan: None})
26

27
    else:
28
        raise ValueError(f"Nieznany format pliku: {fn}")
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc